Hi,
I encountered, that when I load a 24bit TGA from file, that A8 returns as format 8888, while bytespp is = 3; this is, I guess, because of the conversion for being used with DirectX or so... right?
Well, because I am writing some functions for saving BMAP*'s to file, I came up with this solution:
BOOL bUseAlpha = (((format == 8888) || (format == 1555) || (format == 4444)) && (b->bytespp == 4));
So, whenever I get a format that possibly implicates an alpha channel, I also require the (original) bytespp field to be = 4.
Is this correct for all loaded images from file and all procedurally generated images?