Vcl.Imaging.pngimage.TPngImage.CreateBlank

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

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

Propriétés

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


Description

Crée une nouvelle instance vide de la classe TPngImage.

Appelez la méthode CreateBlank pour initialiser une nouvelle instance de la classe TPngImage. Utilisez les paramètres ColorType et BitDepth pour spécifier comment les pixels sont encodés dans l'image. Les paramètres cx et cy doivent contenir la taille de la nouvelle image.

ColorType et BitDepth fonctionnent en tandem et doivent avoir les valeurs du tableau suivant. Sinon, une exception (spécifications PNG non valides) est déclenchée.

ColorType BitDepth Exception

COLOR_GRAYSCALE, COLOR_RGB, COLOR_PALETTE, COLOR_GRAYSCALEALPHA, COLOR_RGBALPHA

1, 2, 4, 8, 16

NON

COLOR_PALETTE

16

OUI

COLOR_RGB

< 8

OUI

Voir aussi