Vcl.Imaging.pngimage.TPngImage.CreateBlank

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

constructor CreateBlank(ColorType, Bitdepth: Cardinal; cx, cy: Integer);

Properties

Type Visibility Source Unit Parent
constructor public Vcl.Imaging.pngimage.pas Vcl.Imaging.pngimage TPngImage

Description

Creates a new blank instance of the TPngImage class.

Call CreateBlank to initialize a new instance of the TPngImage class. Use the ColorType and BitDepth parameters to specify how the pixels are encoded in the image. The cx and cy parameters should contain the size of the new image.

ColorType and BitDepth work in tandem and should be as in the table below, otherwise, an exception (invalid PNG specifications) is raised.

ColorType BitDepth Exception

COLOR_GRAYSCALE, COLOR_RGB, COLOR_PALETTE, COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA

1, 2, 4, 8, 16

NO

COLOR_PALETTE

16

YES

COLOR_RGB

< 8

YES

See Also