-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't open CMYK tiff image with spot channels #2821
Comments
We're currently not able to open files with more than 4 channels. |
I also have requests for such files from our users and the only solution I see without rewriting most parts of Pillow is on-the-fly conversion to RGBA. @genequ Will you be satisfied with such solution? |
@homm I wonder if we could figure out a way to spilt extra channels out as additional bands in the image structure, so that we'd have our usual optimized set of pixels, and spot channels like this would essentially be extra single band images. |
@wiredfool Interesting idea. How we can provide access to additional channels? Via image.info? |
@homm it is common a file with several spot channels in the prepress industry(mostly generated by Adobe's product). I do not know if it is a good idea to convert to RGBA. |
Hi! I've created the fix #2938 which allows opening some TIFFs with ExtraSamples. The problem is that that fix also allows opening your sample TIFF while shouldn't. Some more explanation: TIFF files contain
The sample file has the following value:
This means that additional channel in the file contains some service information. So I suppose that it is legal to open the file and discard that channel if we don't know what to do with it. On the other hand, macOS's Preview and Windows's 7 Photo viewer treats that channel as the alpha channel. But InfanView and Paint.NET don't. It is more likely that the file should have ExtraSamples (1,). |
@genequ Oh, I'm sorry, just noticed that you never claim that this is alpha channel. So, does discarding the extra channel is better than rejecting the entire image for you? |
@homm, thanks a lot for your effect! |
The provided sample file has 5 channels, CMYK + PMS 200 C. When i am trying to open it using
Image.open(), it reports: IOError: cannot identify image file '/Users/gequ/Desktop/cmyk.tif'
cmyk.tif.zip
Thanks for taking care of this!
The text was updated successfully, but these errors were encountered: