ImageEn, unit iexBitmaps

TIOParams.BMP_HandleTransparency

TIOParams.BMP_HandleTransparency


Declaration

property BMP_HandleTransparency: Boolean;


Description

Specifies whether the AlphaChannel is output when saving to bitmap format.
If BMP_HandleTransparency is enabled and the image has a valid alpha channel, the image will be saved as a 32bit RGBA bitmap. Otherwise the alpha channel is ignored and the image is saved as a 24bit bitmap (or lower if there are less colors).

Note: BMP_HandleTransparency does not affect the loading of a bitmap. It will be set to true if you load a 32bit RGBA bitmap (with a valid alpha channel).

Default: False


Examples

// Convert Alpha PNG to 32bit BMP
iebmp := TIEBitmap.Create();
iebmp.LoadFromFile( 'D:\OriginalAlpha.png' );
iebmp.ParamsEnabled := True;
iebmp.Params.BMP_HandleTransparency := True; // Alpha Channel will be saved (as a 32bit RGBA BMP)
iebmp.SaveToFile('D:\BMP32.bmp');
iebmp.Free();


See Also

SynchronizeRGBA