[Image-SIG] Conversion from RGB to CMYK
Andrea Cappelli
a.cappelli at asidev.com
Tue Jul 14 15:42:45 CEST 2009
Hi list,
I'm a beginner with Python and I'm using PIL to convert a lot of images
from RGB colorspace to CMYK in order to insert them in a catalogue to be
printed by a typography
i use the following piece of code
handle = PIL.open(filePath).convert("CMYK")
## some stuff
handle.save(newFilePath)
Everything seems ok, except than when I see the generated result (i
produce a pdf using reportlab) with Acrobat Pro the K layer of my images
is empty.
Every point of color in CMYK has the K value equal to 0. Seems that PIL
convert RGB to CMY, ignoring the K value. This is true except for black
images (RGB=0,0,0), that are mapped to (0,0,0,100)
I'm sure this behaviour doesn't depends on Reportlba because if I load
(with tha same code, trying to force colorspace to CMYK) images wich are
already in CMYK (so no conversion occur) the are displayed fine
This is a strange behaviour ora perhaps I'm wrong and I don't use
correctly PIL?
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Questa ? una parte del messaggio firmata digitalmente
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090714/2956d803/attachment.pgp>
More information about the Image-SIG
mailing list