ImageEn, unit iexBitmaps




function HasAlphaChannel(Validate: Boolean = False): boolean;


Specifies whether the current image has an alpha channel.

If Validate is False, HasAlphaChannel will return true even if the alpha channel is not used (image is completely opaque, but AlphaChannel is valid).
If Validate is true, it will check that the image uses the alpha channel, i.e. some parts of the image are transparent. The AlphaChannel is removed if not used.


if ImageEnView1.IEBitmap.HasAlphaChannel() then... // Image has alpha channel, may or may not be used

if ImageEnView1.IEBitmap.HasAlphaChannel( True ) then... // Image has alpha channel, part of the image are transparent