Re: [Image-SIG] playing with CMYK images
Hey list I'm sorry if your guys find my post rude - it wasn't meant that way! i find PIL a great product, but when writing the post i might have been a little bit fustrated. I will post an example tomorrow, when i fetch it - i might note, that i currently have made a solution with imagemagick (running via an perl-script since i couldn't find working python bindings to magick wand) and that works flawlessly... But i would like a native python solution - i'll upload examples tomorrow. On Mon, Mar 2, 2009 at 8:04 PM, Charlie Clark char...@begeistert.orgwrote: Am 27.02.2009 um 19:09 schrieb Ask Holme: Hey list i have just tried using PIL to crop and resize CMYK images (with CMYK as end result, no color mode conversion). I must say i was surprised how awfull the result look. Even though PIL is not supposed to touch the color mode, colors is totally fucked up in the modified image. Is that because i'm doing something wrong or is the only solution simply to switch to imagemagick if i want better CMYK support wow! As someone who normally appreciates informality on mailing lists and relishes in the triumph of the vernacular I found this a rude first post. Can you please provide some details as to what's gone so horribly wrong. I would be surprised if the problem is actually with PIL per se and not with one of the underlying C libraries. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 -- Ask Holme - 28 76 98 87 ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig
Re: [Image-SIG] playing with CMYK images
Am 27.02.2009 um 19:09 schrieb Ask Holme: Hey list i have just tried using PIL to crop and resize CMYK images (with CMYK as end result, no color mode conversion). I must say i was surprised how awfull the result look. Even though PIL is not supposed to touch the color mode, colors is totally fucked up in the modified image. Is that because i'm doing something wrong or is the only solution simply to switch to imagemagick if i want better CMYK support wow! As someone who normally appreciates informality on mailing lists and relishes in the triumph of the vernacular I found this a rude first post. Can you please provide some details as to what's gone so horribly wrong. I would be surprised if the problem is actually with PIL per se and not with one of the underlying C libraries. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig
Re: [Image-SIG] playing with CMYK images
i have just tried using PIL to crop and resize CMYK images (with CMYK as end result, no color mode conversion). I must say i was surprised how awfull the result look. Even though PIL is not supposed to touch the color mode, colors is totally fucked up in the modified image. Can you provide an example of your image and your cropping script? The first thing that comes to mind is that there is a color profile attached to the original, and it's being stripped. Tim ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig
Re: [Image-SIG] playing with CMYK images
I ran into a similar problems with CMYK and I think it's because libjpeg doesn't interpret the CMYK data correctly (possibly stripping a color profile). This is easily verified using libjpeg standalone tools (like jpegtran that you can compile when compiling libjpeg). On the other hand, using ImageMagick python bindings (PythonMagick) worked fine (I assume ImageMagick doesn't rely on libjpeg). However it is my understanding that PythonMagick is unfortunately not fully fonctional and barely documented. - Original Message From: Tim Hatch t...@timhatch.com To: image-sig image-sig@python.org Sent: Monday, March 2, 2009 11:32:32 AM Subject: Re: [Image-SIG] playing with CMYK images i have just tried using PIL to crop and resize CMYK images (with CMYK as end result, no color mode conversion). I must say i was surprised how awfull the result look. Even though PIL is not supposed to touch the color mode, colors is totally fucked up in the modified image. Can you provide an example of your image and your cropping script? The first thing that comes to mind is that there is a color profile attached to the original, and it's being stripped. Tim ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig
Re: [Image-SIG] playing with CMYK images
The jpeg plugin doesn't handle CMYK properly - I've posted patches in the past... trivial to fix. Kevin. On 02 Mar 2009, at 14:04, Charlie Clark wrote: Am 27.02.2009 um 19:09 schrieb Ask Holme: Hey list i have just tried using PIL to crop and resize CMYK images (with CMYK as end result, no color mode conversion). I must say i was surprised how awfull the result look. Even though PIL is not supposed to touch the color mode, colors is totally fucked up in the modified image. Is that because i'm doing something wrong or is the only solution simply to switch to imagemagick if i want better CMYK support wow! As someone who normally appreciates informality on mailing lists and relishes in the triumph of the vernacular I found this a rude first post. Can you please provide some details as to what's gone so horribly wrong. I would be surprised if the problem is actually with PIL per se and not with one of the underlying C libraries. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig
Re: [Image-SIG] playing with CMYK images
Thanks for the explanation, I followed your link to the thread but I couldn't find the attachement you mentioned in it (because I'd like to use your patch !). Is PIL still maintained (considering the patch is 3 years old) ? Or is there a specific reason it's not included in PIL ? - Original Message From: jcup...@gmail.com jcup...@gmail.com Cc: image-sig image-sig@python.org Sent: Monday, March 2, 2009 2:58:04 PM Subject: Re: [Image-SIG] playing with CMYK images 2009/3/2 David Berthelot d_berthe...@yahoo.com: I ran into a similar problems with CMYK and I think it's because libjpeg doesn't interpret the CMYK data correctly (possibly stripping a color profile). This is easily verified using libjpeg standalone tools (like jpegtran that you can compile when compiling libjpeg). The problem is probably that Photoshop does not follow the spec and for some reason writes CMYK JPEGs with inverted inks. Sadly there's not a (as far as I know) 100% way to spot Photoshop CMYK JPEGs. If you think you might have a P/shop CMYK JPEG, you need to do 255-r, 255-g, 255-b, 255-k after loading it. Here's a previous thread on the issue: http://aspn.activestate.com/ASPN/Mail/Message/image-sig/3110476 On the other hand, using ImageMagick python bindings (PythonMagick) worked fine (I assume ImageMagick doesn't rely on libjpeg). IM does use libjpeg, but it guesses that if there's an Adobe app marker it should invert inks. I don't think this is foolproof though. John ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig
Re: [Image-SIG] playing with CMYK images
Thanks for the explanation, I followed your link to the thread but I couldn't find the attachement you mentioned in it (because I'd like to use your patch !). Try http://mail.python.org/pipermail/image-sig/2006-April/003871.html instead. Tim ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig