Reference IBitmapData
Declared in Codebot.Platform.pas on line 173
IBitmapData holds an image as pixels in memory and can load and save it. SetSize resizes the image, after which the contents of Pixels are undefined. Pixels points to Width * Height pixels of 4 bytes each, stored in rows from top to bottom. Each pixel is blue, green, red, and alpha with the colors premultiplied by alpha. SaveToStream writes a png unless the bitmap was loaded from another format.
IBitmapData = interface
public
{ Resize the image leaving the pixels undefined }
procedure SetSize(Width, Height: Integer);
{ Load the image from a file }
procedure LoadFromFile(const FileName: string);
{ Load the image from a stream }
procedure LoadFromStream(Stream: TStream);
{ Save the image to a file }
procedure SaveToFile(const FileName: string);
{ Save the image to a stream }
procedure SaveToStream(Stream: TStream);
{ The width of the image in pixels }
property Width: Integer read GetWidth;
{ The height of the image in pixels }
property Height: Integer read GetHeight;
{ The address of the first pixel }
property Pixels: Pointer read GetPixels;
end;