I'm trying to read merged RGBA data from PSD format. "Image data" section contains channels (RGBAA... where first A might be a merged transparency or Alpha mask). Can someone tell me how to know what is stored in first A? I noticed that:
So how do I reliable differentiate between Transparency and Alpha mask in first Alpha channel?
From PSD specification:
Layer count. If it is a negative number, its absolute value is the number of layers and the first alpha channel contains the transparency data for the merged result.
So simple (layerCount < 0) tells me if first A is transparency or Alpha-mask.