From python at paul.sladen.org Thu Dec 1 08:32:20 2011 From: python at paul.sladen.org (Paul Sladen) Date: Thu, 1 Dec 2011 07:32:20 +0000 (GMT) Subject: [Image-SIG] PIL does not support iTXt PNG chunks [patch] Message-ID: (Forwarded from: http://bugs.python.org/issue13514 per Ezio Melotti) The Python Imaging Library does not support handling of UTF-8 'iTXt' key:value chunks in PNG files: http://www.w3.org/TR/PNG/#11iTXt Such support is necessary for successful extraction of key:value pairs of UTF-8 encoded data, stored in an PNG 'iTXt' comment chunk. The following example file (from British GCHQ) demonstrates such a record in a PNG file. Based on this evidence, it is highly likely that GCHQ hide all of their important secrets using this kind of steganography, and likely necessary that spies from the rest of the world are requiring similar access to GCHQ secrets. Inclusion of a working chunk_iTXt() PIL/PNG support function will enable more harmonious and effective eavesdropping. Example image: http://www.canyoucrackit.co.uk/images/cyber.png (The attached .py file is not a directly apply-able patch, but contains a working implementation for chunk_iTXt() and a demonstrative test function for inserting it). -Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: chunk_iTXt.py Type: text/x-python Size: 1217 bytes Desc: URL: From aaron at halcyonmolecular.com Thu Dec 1 22:50:54 2011 From: aaron at halcyonmolecular.com (Aaron VanDevender) Date: Thu, 1 Dec 2011 13:50:54 -0800 Subject: [Image-SIG] Loading Big-Endian Floating Point TIFF Files Message-ID: Hello Python Image folks, I'm using PIL 1.1.7. I would like to load a TIFF file that stores its pixels in 32-bit big-endian floating point format. When I use Image.open it reads the file and mode is given as "F;32BF", however if I use the convert or getdata methods I get: /usr/lib/python2.7/dist-packages/PIL/ImageFile.pyc in load_prepare(self) 229 if not self.im or\ 230 self.im.mode != self.mode or self.im.size != self.size: --> 231 self.im = Image.core.new(self.mode, self.size) 232 # create palette (optional) 233 if self.mode == "P": ValueError: unrecognized mode What would be the easiest way to add support for this format, or convert it to a simple "F" mode? Thank you. -Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaurav3184 at gmail.com Fri Dec 2 18:46:04 2011 From: gaurav3184 at gmail.com (Gaurav Sood) Date: Fri, 2 Dec 2011 23:16:04 +0530 Subject: [Image-SIG] Python Imaging Library port for python 3.X Message-ID: Hi When we can expect PIL port for python 3.X. Is there any tentative time frame for this to happen Gaurav -------------- next part -------------- An HTML attachment was scrubbed... URL: From aclark at aclark.net Tue Dec 6 21:20:55 2011 From: aclark at aclark.net (Alex Clark) Date: Tue, 06 Dec 2011 15:20:55 -0500 Subject: [Image-SIG] Python Imaging Library port for python 3.X In-Reply-To: References: Message-ID: On 12/2/11 12:46 PM, Gaurav Sood wrote: > Hi > > When we can expect PIL port for python 3.X. Is there any tentative time > frame for this to happen I don't know if Fredrik is working on it, but I'm moderately interested in doing some development toward Python 3-compat over in Pillow land: - https://github.com/collective/Pillow > > Gaurav > > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? http://pythonpackages.com From macasuba at gmail.com Thu Dec 8 23:09:55 2011 From: macasuba at gmail.com (M. van Hout) Date: Thu, 8 Dec 2011 23:09:55 +0100 Subject: [Image-SIG] Phyton pil on AppleTV2 Message-ID: Hi Python support, I hope you can help me out. I just tried to install Python PIL on my AppleTV. I found a description on how to (with the iOS debs) here : http://thoyan0nymous.posterous.com/python-pil-for-atv2 all goes well, till the dpkg of the last deb file. I think I should first install Python. How can I install Python for iOS 4 ? Can you help? This is my error : AppleTV:/ root# dpkg -i python-PIL1.1.7-1.deb Selecting previously deselected package python-pil. (Reading database ... 6646 files and directories currently installed.) Unpacking python-pil (from python-PIL1.1.7-1.deb) ... dpkg: dependency problems prevent configuration of python-pil: python-pil depends on python (>= 2.5); however: Package python is not installed. python-pil depends on python (<< 2.6); however: Package python is not installed. dpkg: error processing python-pil (--install): dependency problems - leaving unconfigured Errors were encountered while processing: python-pil AppleTV:/ root# kind regards www.imho.nu Maurice -------------- next part -------------- An HTML attachment was scrubbed... URL: From xlty.0512 at gmail.com Fri Dec 9 04:47:06 2011 From: xlty.0512 at gmail.com (=?UTF-8?B?5bCP5qW85ZCs6Zuo?=) Date: Fri, 9 Dec 2011 11:47:06 +0800 Subject: [Image-SIG] a regular jpg file( add author info) cannot be recognized: please help, error info: IOError: cannot identify image file Message-ID: why this error cause? i can open it from ImageViewer , browser or other photo browser. thanks all -- HangZhou Zhejiang China ???? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 101531823_1.jpg Type: image/jpeg Size: 33310 bytes Desc: not available URL: From aclark at aclark.net Tue Dec 13 00:49:45 2011 From: aclark at aclark.net (Alex Clark) Date: Mon, 12 Dec 2011 18:49:45 -0500 Subject: [Image-SIG] Phyton pil on AppleTV2 In-Reply-To: References: Message-ID: On 12/8/11 5:09 PM, M. van Hout wrote: > Hi Python support, > > I hope you can help me out. > I just tried to install Python PIL on my AppleTV. > I found a description on how to (with the iOS debs) here : > http://thoyan0nymous.posterous.com/python-pil-for-atv2 > > all goes well, till the dpkg of the last deb file. > > I think I should first install Python. > How can I install Python for iOS 4 ? > Can you help? > > This is my error : > > AppleTV:/ root# dpkg -i python-PIL1.1.7-1.deb > Selecting previously deselected package python-pil. > (Reading database ... 6646 files and directories currently installed.) > Unpacking python-pil (from python-PIL1.1.7-1.deb) ... > dpkg: dependency problems prevent configuration of python-pil: > python-pil depends on python (>= 2.5); however: > Package python is not installed. > python-pil depends on python (<< 2.6); however: > Package python is not installed. > dpkg: error processing python-pil (--install): > dependency problems - leaving unconfigured > Errors were encountered while processing: > python-pil > AppleTV:/ root# dpkg -i python, perhaps? > > kind regards > www.imho.nu > Maurice > > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? http://pythonpackages.com From aaron at halcyonmolecular.com Fri Dec 16 23:07:26 2011 From: aaron at halcyonmolecular.com (Aaron VanDevender) Date: Fri, 16 Dec 2011 14:07:26 -0800 Subject: [Image-SIG] Loading Big-Endian Floating Point TIFF Files Message-ID: Hello Python Image folks, I'm using PIL 1.1.7. I would like to load a TIFF file that stores its pixels in 32-bit big-endian floating point format. When I use Image.open it reads the file and mode is given as "F;32BF", however if I use the convert or getdata methods I get: /usr/lib/python2.7/dist-packages/PIL/ImageFile.pyc in load_prepare(self) 229 if not self.im or\ 230 self.im.mode != self.mode or self.im.size != self.size: --> 231 self.im = Image.core.new(self.mode, self.size) 232 # create palette (optional) 233 if self.mode == "P": ValueError: unrecognized mode However, if I say image_tiff = Image.open(file_tiff) if image_tiff.mode == "F;32BF": image_tiff.mode = "F" image = numpy.asarray(image_tiff) It will .convert() properly. It seems that there is a bug in the TIFF loader that is mistaking the raw mode for the mode. -Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From atv2 at upcmail.nl Tue Dec 27 10:57:58 2011 From: atv2 at upcmail.nl (M. van Hout) Date: Tue, 27 Dec 2011 09:57:58 +0000 (UTC) Subject: [Image-SIG] Phyton pil on AppleTV2 References: Message-ID: Alex Clark aclark.net> writes: > > On 12/8/11 5:09 PM, M. van Hout wrote: > > Hi Python support, > > > > I hope you can help me out. > > I just tried to install Python PIL on my AppleTV. > > I found a description on how to (with the iOS debs) here : > > http://thoyan0nymous.posterous.com/python-pil-for-atv2 > > > > all goes well, till the dpkg of the last deb file. > > > > I think I should first install Python. > > How can I install Python for iOS 4 ? > > Can you help? > > > > dpkg -i python, perhaps? > > > > > kind regards > > www.imho.nu > > Maurice > > > > > > _______________________________________________ > > Image-SIG maillist - Image-SIG python.org > > http://mail.python.org/mailman/listinfo/image-sig > Solved it, As always it's simple when your found it. The command is : apt-get install python This installes Python 2.5.1 (r251:54863) It is also possible to install Python 2.6.5 (r265:79063) You can find my Python and Python PIL results here : www.imho.nu Thanks Kind regards From songlixin at vanzotec.com Tue Dec 20 03:50:41 2011 From: songlixin at vanzotec.com (=?gb2312?B?y87BotDCo6i3ste/zajRtqOp?=) Date: Tue, 20 Dec 2011 10:50:41 +0800 Subject: [Image-SIG] gif convert png wrong Message-ID: <000301ccbec2$29958760$7cc09620$@com> Hello All: I am writing a python tool that covert gif to png so it can be used for android ROM customization. My script is after the text, but it doesn?t work for some gifs, such as the one at: ftp://help:help at 222.68.182.226/gif2.gif several frames are wrong(See png_ok and png_wrong) And it?s not rare: 2 of my 7 gifs got wrong with the scripts. While a tool named: ?Ulead GIF Animator 5? under windows can convert it without problem. To be honest, imagemagick and another linux tool gif2png also has the same problem. And Also AcdSee (Under Windows)! I have no idea about this and I really wish to write a tool to improve our efficiency. Could some expert take a look on it? BR, Lixin Song ======================================================================= #!/usr/bin/env python # -*- coding: utf-8 -*- import Image im = Image.open('gif2.gif') def iter_frames(im): try: i= 0 while 1: im.seek(i) imframe = im.copy() if i == 0: palette = imframe.getpalette() else: imframe.putpalette(palette) yield imframe i += 1 except EOFError: pass for i, frame in enumerate(iter_frames(im)): frame.save('test%d.png' % i,**frame.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: From songlixin at vanzotec.com Tue Dec 20 10:48:27 2011 From: songlixin at vanzotec.com (=?gb2312?B?y87BotDCo6i3ste/zajRtqOp?=) Date: Tue, 20 Dec 2011 17:48:27 +0800 Subject: [Image-SIG] =?gb2312?b?tPC4tDogZ2lmIGNvbnZlcnQgcG5nIHdyb25n?= Message-ID: <001201ccbefc$8649eed0$92ddcc70$@com> Also I found that GIMP does not work, but Adobe Image Ready work. ???: ????????? [mailto:songlixin at vanzotec.com] ????: 2011?12?20? ??? 10:51 ???: 'image-sig at python.org' ??: gif convert png wrong Hello All: I am writing a python tool that covert gif to png so it can be used for android ROM customization. My script is after the text, but it doesn?t work for some gifs, such as the one at: ftp://help:help at 222.68.182.226/gif2.gif several frames are wrong(See png_ok and png_wrong) And it?s not rare: 2 of my 7 gifs got wrong with the scripts. While a tool named: ?Ulead GIF Animator 5? under windows can convert it without problem. To be honest, imagemagick and another linux tool gif2png also has the same problem. And Also AcdSee (Under Windows)! I have no idea about this and I really wish to write a tool to improve our efficiency. Could some expert take a look on it? BR, Lixin Song ======================================================================= #!/usr/bin/env python # -*- coding: utf-8 -*- import Image im = Image.open('gif2.gif') def iter_frames(im): try: i= 0 while 1: im.seek(i) imframe = im.copy() if i == 0: palette = imframe.getpalette() else: imframe.putpalette(palette) yield imframe i += 1 except EOFError: pass for i, frame in enumerate(iter_frames(im)): frame.save('test%d.png' % i,**frame.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsaucedo at gmail.com Tue Dec 20 15:47:18 2011 From: jsaucedo at gmail.com (Johnny Saucedo) Date: Tue, 20 Dec 2011 09:47:18 -0500 Subject: [Image-SIG] your server at down @ http://effbot.org/downloads/PIL-1.1.7.win32-py2.6.exe Message-ID: Trying to download http://effbot.org/downloads/PIL-1.1.7.win32-py2.6.exe but your server is down. Tried 3 times and from 2 browsers. Please reboot! Thanks. Johnny From NeedellZ at si.edu Tue Dec 20 19:11:55 2011 From: NeedellZ at si.edu (Needell, Zachary) Date: Tue, 20 Dec 2011 13:11:55 -0500 Subject: [Image-SIG] PIL help Message-ID: <195A6A7DAD1C774CA3BB3F7970BCD1542C98AD8303@SI-MSEV01.US.SINET.SI.EDU> Hi, I am a complete amateur at this. I'm trying to install and run SciPy, specifically ndimage, on my work computer (I'm doing image analysis--I'm used to using IDL but don't want to pay for it). It is a 64 bit macbook pro running OS X Lion, I am using python 2.7. Reading error messages and looking around on the internet leads me to think that I need to install PIL in order for everything to work. I am trying to install it going by the instructions, but I keep running into problems. Specifically it spits out: running install running build running build_py running build_ext --- using frameworks at /System/Library/Frameworks building '_imaging' extension gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.6-intel-2.7/_imaging.o unable to execute gcc-4.2: No such file or directory error: command 'gcc-4.2' failed with exit status 1 and then dies. Am I making this more complicated than it needs to be? I have installed xcode and that does not seem to fix it. Thanks for any help, keeping in mind that i'm a total newb. From aaron at thelastpickle.com Wed Dec 21 02:22:42 2011 From: aaron at thelastpickle.com (aaron morton) Date: Wed, 21 Dec 2011 14:22:42 +1300 Subject: [Image-SIG] PIL 1.1.7 missing from PyPi Message-ID: <4672148F-2731-4A50-8C8F-0AAB4B0A0690@thelastpickle.com> Hi, I noticed that version 1.1.7 has disappeared from PyPi http://pypi.python.org/pypi/PIL/1.1.7 1.1.6 is still there http://pypi.python.org/pypi/PIL/1.1.6 I cannot say for sure it was there, but my Pip script was able to get it before so I am assuming it was. ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From saurabhgupta2u at gmail.com Wed Dec 21 09:22:44 2011 From: saurabhgupta2u at gmail.com (Saurabh Gupta) Date: Wed, 21 Dec 2011 13:52:44 +0530 Subject: [Image-SIG] Writing custom metadata on images Message-ID: Hi! I'm looking to write custom metadata on to images(mostly jpegs, but could be others too). So far I haven't been able to do that through PIL. I understand that I can update some pre-defined tags, but I need to create custom fields/tags! Can that be done? This data would be created by users, so I wouldn't know what those tags are before hand. I need to allow them to create tags & then write data for them. For example, someone may want to create these tags on a particular image : skin_type : smooth complexion : fair eye_color: blue terrain: mountains I also found that upon saving a jpeg through the PIL JpegImagePlugin, all previous metadata is overwritten with new data that you don't get to edit? Is that a bug? Cheers, S -- Impossible.....is the creation of the mind. -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlie.clark at clark-consulting.eu Thu Dec 29 13:46:37 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Thu, 29 Dec 2011 13:46:37 +0100 Subject: [Image-SIG] PIL help In-Reply-To: <195A6A7DAD1C774CA3BB3F7970BCD1542C98AD8303@SI-MSEV01.US.SINET.SI.EDU> References: <195A6A7DAD1C774CA3BB3F7970BCD1542C98AD8303@SI-MSEV01.US.SINET.SI.EDU> Message-ID: Hi Zachary, Am 20.12.2011, 19:11 Uhr, schrieb Needell, Zachary : > Hi, > I am a complete amateur at this. I'm trying to install and run SciPy, > specifically ndimage, on my work computer (I'm doing image analysis--I'm > used to using IDL but don't want to pay for it). It is a 64 bit macbook > pro running OS X Lion, I am using python 2.7. Reading error messages > and looking around on the internet leads me to think that I need to > install PIL in order for everything to work. I am trying to install it > going by the instructions, but I keep running into problems. Unfortunately compiling posix binaries on Mac OS can be more complicated than it needs to be. > Specifically it spits out: > running install > running build > running build_py > running build_ext > --- using frameworks at /System/Library/Frameworks > building '_imaging' extension > gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot > /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG > -g -O3 -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers > -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging > -I/Library/Frameworks/Python.framework/Versions/2.7/include > -I/usr/include > -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c > _imaging.c -o build/temp.macosx-10.6-intel-2.7/_imaging.o > unable to execute gcc-4.2: No such file or directory > error: command 'gcc-4.2' failed with exit status 1 > and then dies. Am I making this more complicated than it needs to be? > I have installed xcode and that does not seem to fix it. > Thanks for any help, keeping in mind that i'm a total newb. The error you are getting is that the gcc compiler cannot be found which seems to suggest that you may not have installed XCode correctly. Python also seems to be set up to run on Mac OS Snow Leopard which is why it refers to -i386 and -x86_64 and macosx-10.6-intel. Lion is Mac OS 10.7 uses just i686. My suggestion to any Python on Mac OS is to use MacPorts for basic software components. One advantage this provides is version and security updates. You can download and install MacPorts from http://www.macports.org/install.php It requires X Code to work but comes with good instructions on how to do that. You can then install Python and related packages like this: sudo port install python-27 py27-pip sudo pip install scipy pillow ndimage "Pillow" is a version of PIL that is very easy to install. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a D?sseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From charlie.clark at clark-consulting.eu Thu Dec 29 21:48:30 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Thu, 29 Dec 2011 21:48:30 +0100 Subject: [Image-SIG] gif convert png wrong In-Reply-To: <000301ccbec2$29958760$7cc09620$@com> References: <000301ccbec2$29958760$7cc09620$@com> Message-ID: Dear Song (I hope I have this the right way round), Am 20.12.2011, 03:50 Uhr, schrieb ????????? : > Hello All: > I am writing a python tool that covert gif to png so it can be used > for android ROM customization. > My script is after the text, but it doesn?t work for some > gifs, > such as the one at: > ftp://help:help at 222.68.182.226/gif2.gif > several frames are wrong(See png_ok and png_wrong) > And it?s not rare: 2 of my 7 gifs got wrong with the > scripts. > While a tool named: ?Ulead GIF Animator 5? under > windows can convert it without problem. > To be honest, imagemagick and another linux tool > gif2png > also has the same problem. And Also AcdSee (Under Windows)! > I have no idea about this and I really wish to write a > tool to improve our efficiency. > Could some expert take a look on it? > BR, > Lixin Song The problem seems to be related to the underlying library used for either GIF or PNG images as your script runs fine on my machine (Mac OS 10.7). Frames 2 and 56 look a bit weird but the original image looks like this. I'm not sure which frames you think don't work. FWIW your script isn't very Pythonic (the try clause should preferably only contain one statement with known error conditions) and can be rewritten thus: for i in range(im.info['duration']): try: im.seek(i) except EOFError: break im.save("test%02d.png" % i) Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a D?sseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From songlixin at vanzotec.com Fri Dec 30 02:38:28 2011 From: songlixin at vanzotec.com (=?utf-8?B?5a6L56uL5paw77yI5Yeh5Y2T6YCa6K6v77yJ?=) Date: Fri, 30 Dec 2011 09:38:28 +0800 Subject: [Image-SIG] =?utf-8?b?562U5aSNOiAgZ2lmIGNvbnZlcnQgcG5nIHdyb25n?= In-Reply-To: References: <000301ccbec2$29958760$7cc09620$@com> Message-ID: <002101ccc693$bcf6ba00$36e42e00$@com> Dear Charlie: For my case, frame 57 is wrong and also some after 57. I think it's a known issue bcz so many tools(Include ACDSee) got same problem. Maybe IP reasons. I will try on MacOS. Also thanks for your advice to be more Pythinic. :P Br, Lixin Song -----????----- ???: image-sig-bounces+songlixin=vanzotec.com at python.org [mailto:image-sig-bounces+songlixin=vanzotec.com at python.org] ?? Charlie Clark ????: 2011?12?30? ??? 4:49 ???: image-sig at python.org ??: Re: [Image-SIG] gif convert png wrong Dear Song (I hope I have this the right way round), Am 20.12.2011, 03:50 Uhr, schrieb ????????? : > Hello All: > I am writing a python tool that covert gif to png so it can be used > for android ROM customization. > My script is after the text, but it doesn?t work for some > gifs, > such as the one at: > ftp://help:help at 222.68.182.226/gif2.gif > several frames are wrong(See png_ok and png_wrong) > And it?s not rare: 2 of my 7 gifs got wrong with the > scripts. > While a tool named: ?Ulead GIF Animator 5? under > windows can convert it without problem. > To be honest, imagemagick and another linux tool > gif2png > also has the same problem. And Also AcdSee (Under Windows)! > I have no idea about this and I really wish to write a > tool to improve our efficiency. > Could some expert take a look on it? > BR, > Lixin Song The problem seems to be related to the underlying library used for either GIF or PNG images as your script runs fine on my machine (Mac OS 10.7). Frames 2 and 56 look a bit weird but the original image looks like this. I'm not sure which frames you think don't work. FWIW your script isn't very Pythonic (the try clause should preferably only contain one statement with known error conditions) and can be rewritten thus: for i in range(im.info['duration']): try: im.seek(i) except EOFError: break im.save("test%02d.png" % i) Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a D?sseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 _______________________________________________ Image-SIG maillist - Image-SIG at python.org http://mail.python.org/mailman/listinfo/image-sig From charlie.clark at clark-consulting.eu Fri Dec 30 17:17:56 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Fri, 30 Dec 2011 17:17:56 +0100 Subject: [Image-SIG] =?utf-8?b?562U5aSNOiAgZ2lmIGNvbnZlcnQgcG5nIHdyb25n?= In-Reply-To: <002101ccc693$bcf6ba00$36e42e00$@com> References: <000301ccbec2$29958760$7cc09620$@com> <002101ccc693$bcf6ba00$36e42e00$@com> Message-ID: Hi Song, Am 30.12.2011, 02:38 Uhr, schrieb ????????? : > Dear Charlie: > For my case, frame 57 is wrong and also some after 57. > I think it's a known issue bcz so many tools(Include ACDSee) got same > problem. Maybe IP reasons. Possibly a palette problem. If I open the file in Photoline (a very good Photoshop clone) I have two layers that have no background while all others have a black background. This would seem to be a palette optimisation. If you compile your own version of PIL be sure to check the versions of the underlying libraries. > I will try on MacOS. > Also thanks for your advice to be more Pythinic. Of course, your use of an generator function was Pythonic but a little over the top, especially as it actually creates a counter that the for loop could use. The counter is necessary as my use of "duration" was an incorrect guess! More importantly, you are unnecessarily creating copies of each frame in memory just to save the frames to disk. However, as disk IO seems to be the bottleneck this has little practical implications for this image but could be important in another situation. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a D?sseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From auto11436877 at hushmail.com Thu Dec 29 13:31:05 2011 From: auto11436877 at hushmail.com (auto11436877 at hushmail.com) Date: Thu, 29 Dec 2011 09:31:05 -0300 Subject: [Image-SIG] Simple Question, avoid Image.save Message-ID: <20111229123106.01A4B6F443@smtp.hushmail.com> Hi, I wanted to get the actual bmp data without writting the content to disk. Example:im = Image.new("RGB", (16, 16) )im.save('image.bmp') I want to avoid im.save, and just get the actual BMP file data for further processing. Hope you can help me. Thanks a lot!Sean -------------- next part -------------- An HTML attachment was scrubbed... URL: From damonlynch at gmail.com Thu Dec 29 19:27:17 2011 From: damonlynch at gmail.com (Damon Lynch) Date: Thu, 29 Dec 2011 12:27:17 -0600 Subject: [Image-SIG] Writing custom metadata on images Message-ID: Hi Saurabh, I have zero experience using PIL to handle metadata. But I do want to mention if you're looking for a robust way to handle metadata in a variety of different image file formats, you might find that pyexiv2 complements PIL rather nicely: http://tilloy.net/dev/pyexiv2/ Best, Damon -- http://www.damonlynch.net -------------- next part -------------- An HTML attachment was scrubbed... URL: