In Python how do you detect if a JPEG uses CMYK color space and how do you convert it to RGB?

492 views
Skip to first unread message

PandaSuit

unread,
May 19, 2011, 4:17:03 PM5/19/11
to Google App Engine
http://stackoverflow.com/questions/6063588/on-google-app-engine-in-python-how-do-you-detect-if-a-jpeg-uses-cmyk-color-space

The Images API in Google App Engine does not appear to handle CMYK
JPEG images properly when applying transforms. On the production
server the resulting image looks washed out and on the dev server
(where GAE uses PIL) the resulting image is darker and less defined.

It seems like the API assumes all JPEG files are RGB.

Is there a way to detect a CMYK image on Google App Engine?

Is there a way to convert the image to RGB?

Alexander Maslov

unread,
May 20, 2011, 3:16:07 AM5/20/11
to google-a...@googlegroups.com
JPEG format on it's own has nothing to do with CMYK color space. JPEG was made with RGB nature of on screen images in mind. Usage of CMYK color space before compression stage in JPEG file is handled by some software product with their own color space conversion algorithms. If there is no standards, why Google should support it?  
Reply all
Reply to author
Forward
0 new messages