Vcl.Imaging.pngimage.TPngImage.CreateBlank
Delphi
constructor CreateBlank(ColorType, Bitdepth: Cardinal; cx, cy: Integer);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
constructor | public | Vcl.Imaging.pngimage.pas | Vcl.Imaging.pngimage | TPngImage |
説明
TPngImage クラスの新しい空のインスタンスを作成します。
CreateBlank を呼び出すと、TPngImage クラスの新しいインスタンスを作成します。ColorType および Bitdepth のパラメータを使って、画像内でピクセルをどのようにエンコードするかを指定します。 cx および cy のパラメータには、新しい画像のサイズを持たせる必要があります。
ColorType
および BitDepth
は、連携して動作するもので、値は下の表のものでなければなりません。そうではない場合、例外(不正な PNG 仕様)が発生します。
ColorType | BitDepth | 例外 |
---|---|---|
COLOR_GRAYSCALE、COLOR_RGB、COLOR_PALETTE、COLOR_GRAYSCALEALPHA、COLOR_RGBALPHA |
1、2、4、8、16 |
NO |
COLOR_PALETTE |
16 |
YES |
COLOR_RGB |
< 8 |
YES |