ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
Re: [Image-SIG] Problem with JPEG and CMYK color space
by kevin other posts by this author
Apr 13 2006 12:55PM messages near this date
Re: [Image-SIG] Problem with JPEG and CMYK color space | Re: [Image-SIG] Problem with JPEG and CMYK color space
When saving a CMYK file to JPG, PIL seems to invert the colors.  I've 
submitted a patch to Fredrik already for this, and it should be in the next 
major build.

Adding a simple invert to the image before saving will help.

Kevin.
----- Original Message ----- 
From: "abel deuring" <adeuring@[...].net> 
To: "Cesare Leonardi" <ced@[...].com> 
Cc: <image-sig@[...].org> 
Sent: Thursday, April 13, 2006 1:58 PM
Subject: Re: [Image-SIG] Problem with JPEG and CMYK color space


>  Cesare Leonardi wrote:
> > Berni CED ha scritto:
> >>I have encountered several images that are not managed well by PIL.
> >>Exactly as explainded by the following old mail (which had received no
> >>reply) colors are darker and, in general, different from the original:
> >>http://mail.python.org/pipermail/image-sig/2001-July/001514.html
> >>And like in that mail, my problematic images have one thing in common:
> >>they are JPEG using the CMYK color space. JPEG in RGB are elaborated
> >>correctly.
> >
> > No one can confirm or add some info? It's a known problem? Fredrik?
> 
>  Cesare,
> 
>  I can confirm the problems, though I have no idea, why the files
>  written by PIL have completely wrong colours.
> 
>  Regarding the altered colours of the image displayed by im.show()
>  [disclaimer: I'm writing this without actually having a look into
>  the PIL sources, so I can easily be wrong...]: The changes are
>  probably caused by a very simple conversion from CMYK to RGB, like
>  C = 1 - R, M = 1 - G, Y = 1 - B. Both CMYK and RGB are device
>  dependant color spaces, i.e., if you use two different monitors, and
>  let them display some pixels with identical RGB values, the
>  displayed colours are not exactly identical. The same holds for CMYK
>  colours: Two different ink jet printers will most likely show
>  slightly different colours for the same CMYK value. And offset
>  printing machines (for which most CYMK TIFF/JPEG files are intended)
>  will produce even other colours.
> 
>  For a decent RGB <-> CMYK conversion (which you simply need, if you
>  want to display a CMYK image on a CRT or LCD monitor), I'd recommend
>  to use ICC profiles. An ICC profile provides a kind of "colour
>  description" for a certain device, like a CRT monitor, an inkjet
>  printer, a scanner or a digital camera. You'll find more information
>  on ICC at http://www.color.org. A very good free implementation of
>  ICC based colour conversions is Littlecms
>  (http://www.littlecms.com). Aside from a library for ICC colour
>  conversions, littlecms also provides programs for RGB<->CMYK
>  conversions of JPEG and TIFF images. The littlecms web site has also
>  many useful links to other ICC resources.
> 
>  Abel
>  _______________________________________________
>  Image-SIG maillist  -  Image-SIG@[...].org
>  http://mail.python.org/mailman/listinfo/image-sig
> 
> 
>  


_______________________________________________
Image-SIG maillist  -  Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:
Berni CED
Cesare Leonardi
kevin
kevin
kevin
Cesare Leonardi
Cesare Leonardi
Berni CED
Fredrik Lundh
kevin
Cesare Leonardi
Cesare Leonardi
Steve Holden
kevin
kevin
kevin
Cesare Leonardi
Abel Deuring

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved