Re: [Image-SIG] Embedded ICC profiles - patches for JPEG, PNG, PSD, TIFF (PIL 1.1.6)

2008-04-12 Thread Florian Höch
Hello Frédéric, here are the patches: --- JpegImagePlugin.py.bak Sat Feb 23 01:48:22 2008 +++ JpegImagePlugin.py Sat Mar 08 07:39:58 2008 @@ -81,6 +81,28 @@ elif marker == 0xFFE2 and s[:5] == "FPXR\0": # extract FlashPix information (incomplete) self.info["flashpix

Re: [Image-SIG] Embedded ICC profiles - updated JPEG patch

2008-04-10 Thread Frédéric Mantegazza
On dimanche 24 février 2008, Florian Höch wrote: > Just noticed that the JPEG patch I suggested would not succeed in > retrieving ICC profiles larger than 64K, because these would be split > across multiple APP2 markers. New code: Could you provide a complete patch against the current 1.1.6 versi

Re: [Image-SIG] Embedded ICC profiles - updated JPEG patch

2008-02-24 Thread Florian Höch
Just noticed that the JPEG patch I suggested would not succeed in retrieving ICC profiles larger than 64K, because these would be split across multiple APP2 markers. New code: JpegImagePlugin.py 83a84,105 > elif marker == 0xFFE2 and s[:12] == "ICC_PROFILE\0": > # Since an ICC prof

Re: [Image-SIG] Embedded ICC profiles

2008-02-23 Thread Frédéric Mantegazza
On samedi 23 février 2008, Florian Höch wrote: > Another fix for PIL 1.1.6, this time to enable ICC profile access in psd > files. > > Changes needed in PsdImagePlugin.py (diff format): > 110a111,112 > > > if id == 1039: # ICC profile > > self.info["icc_profil

Re: [Image-SIG] Embedded ICC profiles

2008-02-23 Thread Florian Höch
Another fix for PIL 1.1.6, this time to enable ICC profile access in psd files. Changes needed in PsdImagePlugin.py (diff format): 110a111,112 > if id == 1039: # ICC profile > self.info["icc_profile"] = data Regards, Florian

Re: [Image-SIG] Embedded ICC profiles

2008-02-22 Thread Florian Höch
Just a quick follow-up regarding PNG and reading embedded profiles with PIL in general: I looked at PIL's PngImagePlugin.py and found that support to read embedded ICC profiles was not there. So I added a method to be able to retrieve the profile: PngImagePlugin.py, line 35: import zlib PngIma

Re: [Image-SIG] Embedded ICC profiles

2008-02-22 Thread Florian Höch
Hello Frédéric, first, your work on ImageCms is deeply appreciated! Regarding your question, atleast for JPEG and TIFF images I think I know a way. For JPEG, an embedded ICC profile can be accessed as im.app['APP2'] (there's some data before the actual profile data 'ICC_PROFILE\x00\x01\x01' whi

[Image-SIG] Embedded ICC profiles

2008-02-22 Thread Frédéric
Hello, Is there a way to read ICC tag in images, and extract embedded profiles, with PIL? If not, do you have any links explaining how to do that? Little cms is only able to read a profile from disk or from memory; so I first need to retreive this profile in the image structure. Thanks, ___