Function Image.detectAlpha

Returns constant ALPHA_BLEND if the image has data for alpha values. Returns constant ALPHA_BIT if all the alpha values are stored in a single bit. Returns constant ALPHA_NONE if no data for alpha values is found.

Image.AlphaMode detectAlpha() nothrow @nogc const;