From RAD Studio API Documentation
Jump to: navigation, search


property PixelFormat: TPixelFormat read GetPixelFormat write SetPixelFormat;


__property TPixelFormat PixelFormat = {read=GetPixelFormat, write=SetPixelFormat, nodefault};


Type Visibility Source Unit Parent
property public
Vcl.Graphics TBitmap


Indicates the bit format of the bitmap image, specifying how the image is displayed and how the pixels of the bitmap image are stored in memory.

Use PixelFormat to change a TBitmap's internal image to a particular memory format and color depth, or to find out what memory format and color depth a TBitmap is using. The possible formats are specified in TPixelFormat.

For example, PixelFormat can be used to set the pixel format of the bitmap image to 8-bit for video drivers that cannot display the native format of a bitmap image.

Note: The PixelFormat of a JPEG image object applies to the bitmap if the JPEG image is copied to it.

Changing the pixel format is most commonly used with ScanLine, because your code must decode the pixel data accessed by ScanLine. Image-editing tools usually use one pixel for all internal image operations and copy the results to the screen (in whatever format) as the last step.

See Also

Code Examples