geotiff.js
geotiff.js copied to clipboard
readRGB returns 3-channel data even for transparent images?
So readRasters returns transparent data in case of RGBA images. But readRGB always returns 3 channels right? How do I get transparency mask in that case (for example I'm reading transparent CMYK and RGB files that then project to HTML Canvas that is always RGBA). Thanks!
Hi @jnpatrick99 As far as I understand, CMYK and RGB do not provide an alpha (transparency) channel. You have to specify an offsite color, one color that you manually render as transparent.
readRGB does read 4-channel, when the underlying chromatic representation allows for it, which is currently just RGBA.