Now there is (but you need to upgrade to PIL 1.1.6 first):

http://hoech.net/files/PIL-1.1.6-ICCProfile.zip
(this is an updated version of the patch for accessing ICC profiles I posted to the list a while ago)

Refer to the included ReadMe for installation/more info.

It's a beta, so still needs some testing, but should allow you to:
- retain embedded ICC profiles when saving from/to JPEG, PNG, TIFF.
  Existing code doesn't need to be changed.
- access embedded profiles in JPEG, PNG, PSD, TIFF.

It also includes patches for TIFF to retain IPTC, Photoshop and XMP metadata when saving as TIFF again, read/write TIFF resolution information correctly, and to correct inverted CMYK JPEG files.

For actual color conversions using profiles, you still need an additional library (I recommend ImageCms).

Regards,

Florian

Eric Clack schrieb:
Hi there,
I've been using PIL for some time now and it works very well to rescale and watermark images, however recently I've noticed that it doesn't preserve ICC colour profiles. I have this version (from Image.py):
# 2005-03-28 fl   PIL release 1.1.5

For example:

import Image
i = "/path/to/input_image.jpg"
o = "/path/to/output_i,age.jpg"

im = Image.open(i)
im.save(o)

input_image has the sRGB ICC profile, but now output_image has no profile (confirmed with photoshop).

Is there any way to keep the existing profile, or copy it across so that save saves it?

Many thanks,
-Eric.


------------------------------------------------------------------------

_______________________________________________
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

Reply via email to