Skip to content
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

How to generate RGB by 7 channel coded from CMYK mode #3110

Closed
YubinXie opened this issue Apr 21, 2018 · 7 comments
Closed

How to generate RGB by 7 channel coded from CMYK mode #3110

YubinXie opened this issue Apr 21, 2018 · 7 comments

Comments

@YubinXie
Copy link

There are actually 7 colors that can be generated in CMYK mode, cyan, magenta, yellow, black, red, green, and blue. If I have a 7 channel array (tiff), how can I generated an image with these 7 colors in RGB mode? Many thanks.

@homm
Copy link
Member

homm commented Apr 22, 2018

It's not clear to me, what do you mean and try to achieve.

There are actually 7 colors that can be generated in CMYK mode

Each mode (both CMYK and RGB) can hold millions of colors. CMYK mode consists of four color channels: cyan, magenta, yellow, black. While RGB consists of red, green, and blue.

If I have a 7 channel array (tiff)

Images with all 7 channels don't make sense because information in CMYK channels will contradict with information in RGB channels.

@YubinXie
Copy link
Author

Thanks for the reply. I have a 7-channel tiff image and I want to display it with 1 color for each channel (cyan, magenta, yellow, black, red, green, and blue). The final image would be a RGB image.

@homm
Copy link
Member

homm commented Apr 22, 2018

Correct me if I'm wrong, but TIFFs can't hold CMYK and RGB information simultaneously. According to specification, PhotometricInterpretation tag can be only one in the file and there is no value which allows holding both CMYK and RGB in one image.

@homm
Copy link
Member

homm commented Apr 22, 2018

Maybe you can provide a small example?

@YubinXie
Copy link
Author

Speaking of format, I believe you are right. I just wonder if there is way to display a 7-slice image in one image with each channel being different color.

@homm
Copy link
Member

homm commented Apr 25, 2018

You can't display a 7-slice image because of color space with 7 channels doesn't exist. Color information in some channels will contradict with information in other channels.

@wiredfool
Copy link
Member

You're essentially talking about spot colors at that point. It's done in print, but obviously when rendered on screen it's a 3 channel image.

But it doesn't really matter because there's no support for more than 4 usable channels in pillow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants