delphitbitmap

Default value of PixelFormat for Graphics.TBitmap in Delphi


What is the default value of PixelFormat for TBitmap in Delphi? Do I need to specify PixelFormat everytime I create TBitmap?

For example,

var
  img: TBitmap;
begin
  img := TBitmap.Create;
  img.PixelFormat := pf32bit; // or pf24bit?
  ...
  ...
end;

Solution

  • the default value is pfDevice (equal to zero).