[lazarus] TBitmap.Canvas.Pixels bug & questions

Stefan Weber w-e-b-e-r at web.de
Sun Jun 29 08:02:34 EDT 2003


Setting pixels of a TBitmap via the Canvas does not work, if there's no 
widget associated with the Canvas. The problem is in LM_SETPixel.

Example:
   bmp := TBitmap.Create;
   bmp.Width := 16;
   bmp.Height := 16;
   bmp.Canvas.Pixels[0,0] := clBlack;

Anyway the implementation of SetPixel look quite cumbersome to me, at 
least for standalone (non gtk) bitmaps.

Given a raw bitmap in memory (array of rows of RGB values) what would be 
the best way to create a TBitmap from it using the LCL?

It seems that most of the DIB stuff is not yet implemented in LCL (gtk).

-Stefan






More information about the Lazarus mailing list