[Image-SIG] Converting CMYK JPG image to RGB

Fredrik Lundh fredrik at pythonware.com
Wed Jun 22 14:57:44 CEST 2005

marc birot wrote:

> I'm trying  to convert CMYK Jpg  files to RGB Jpg  files using
> (Image.open("cmyk_image.jpg").convert("RGB"))...
> The result shows very wrong colours.
> After checking the Image-SIG archives (Aug 2004) i found the following :
> "...Older versions of Photoshop generated broken CMYK files, and PIL
> attempts to compensate for this. try commenting out the following lines
> in PIL/JpegImagePlugin.py, and let me know if it helps:
> if self.mode == "CMYK" and self.info.has_key("adobe"):
>     rawmode = "CMYK;I" # Photoshop 2.5 is broken! ..."
> Well, i tried and it does not work. The result i get is close to a
> 'negative' of the original picture ( not too close).

PIL's CMYK conversion isn't very exact, and can be far from the
result you get from proper pre-print stuff.

if the negative is about as wrong as the "positive", using a better
conversion library is your best bet (see Kevin's reply for more info)


More information about the Image-SIG mailing list