Distinguish between transparency and extra alpha channels?

点点圈 提交于 2019-12-12 03:52:10

问题


I am sorry in advance if I am not explaining my question really well. I am not 100% aware of the stuff I am asking.

Lets say that I have some CMYK tiff files. Is there a way that I can distinguish the difference between transparency and extra alpha channel ?

I used exiftools in the terminal with the command : exiftool -G -S filename.tif and I got a tag (ExtraSamples) that provides information about the alpha channel. Is there a way that I can distinguish the aforementioned difference ?

Thanks.


回答1:


See the ExtraSamples TIFF tag description. According to the specification, the tag can have one of three values (per sample above the "natural" number of samples for the color model, i.e. 1 for gray, 3 for RGB or 4 for CMYK):

0 = Unspecified data

1 = Associated alpha data (with pre-multiplied color)

2 = Unassociated alpha data

Now, what you mean by "the difference between transparency and extra alpha channel" isn't really clear to me, as I often use the terms "transparency" and "alpha channel" interchangeably. Perhaps you just mean the above (1 "associated" vs 2 "unassociated" alpha).

Any other extra samples, will use 0 ("unspecified"). Note that these extra samples are not used for transparency or alpha information. However, their meaning is application specific, and would require further context to properly interpret. So if your file contains unspecified ExtraSamples, this is most likely not alpha channels or transparency at all.

The link in your comment makes it somewhat more clear what you refer to by "the difference between transparency and extra alpha channel". However, the link talks about the difference between an alpha channel and a (bit) mask, which are just two types of transparency.

ExtraSamples in a TIFF is typically not used for bit masks, instead a separate IFD with SubFileType "mask" (4) is used.



来源:https://stackoverflow.com/questions/40892985/distinguish-between-transparency-and-extra-alpha-channels

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!