Thank's, but this code seems to free the HBITMAP data.
If I am going to use the HBITMAP later to save to a PNG, I need to be able to continue using it.
If I write to the pixeldata afterwards, I get an AccessViolation
I tried setting Bmp.Handle := 0 before Free'ing the BMP, but that didn't help.
See code snippet for how I create the HBITMAP
Main Topics
Browse All Topics





by: lmiklePosted on 2009-08-11 at 13:27:13ID: 25073011
Try to assign HBitmap to TBitmap's handle and then convert it to jpeg (using jpeg unit) or png (using pngimage library).
Select allOpen in new window