I'm loading PNG images into FMX.Type.TBitmap
in Delphi-XE2 Update3 FireMonkey HD application. How do I check if loaded PNG image has an alpha channel or not?
Currently if I load an image with an alpha channel it has alpha info in Bitmap.Scanline[Y]^[X]
in a form of $AABBGGRR. However if I load PNG image without alpha the said record has only $00BBGGRR entries (AA = 0), just like an image with clear alpha. Hence the problem - how to determine if it is RGBA image with the alpha fully transparent or it is a RGB image (in this case I will process it to make the alpha fully opaque). Note: Checking through all pixels is not an option.
FMX TBitmap has no PixelFormat
property, nor I could find HasAlpha
flag.