From aaronichie2000 at gmail.com Mon Aug 1 12:10:25 2011 From: aaronichie2000 at gmail.com (AARON NICHIE) Date: Mon, 1 Aug 2011 10:10:25 +0000 Subject: [Image-SIG] HELP HELP Message-ID: Am having difficulty in installing PIL and Django-Photologue. I want Ubuntu terminal commands to install both. The error is: aaronichie at aaronichie-Satellite-P105:~/Downloads/django-photologue-2.3$ python setup.py install running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-2710.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/local/lib/python2.7/dist-packages/ -- Aaron Nichie From mquitt at caltech.edu Thu Aug 4 04:39:36 2011 From: mquitt at caltech.edu (Marissa Quitt) Date: Wed, 3 Aug 2011 19:39:36 -0700 Subject: [Image-SIG] size of PixelAccess object Message-ID: Hello, I have just started using PIL, and so far it has been great! I am wondering if there is an easy way to determine the size (width, height) of a PixelAccess object. Thanks, --Marissa From charlie.clark at clark-consulting.eu Thu Aug 4 21:22:28 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Thu, 04 Aug 2011 21:22:28 +0200 Subject: [Image-SIG] HELP HELP In-Reply-To: References: Message-ID: Am 01.08.2011, 12:10 Uhr, schrieb AARON NICHIE : > Am having difficulty in installing PIL and Django-Photologue. I want > Ubuntu terminal commands > to install both. The error is: > aaronichie at aaronichie-Satellite-P105:~/Downloads/django-photologue-2.3$ > python setup.py install > running install > Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ > error: can't create or remove files in install directory > The following error occurred while trying to add or remove files in the > installation directory: > [Errno 13] Permission denied: > '/usr/local/lib/python2.7/dist-packages/test-easy-install-2710.pth' > The installation directory you specified (via --install-dir, --prefix, or > the distutils default setting) was: > /usr/local/lib/python2.7/dist-packages/ Dear Aaron, this sounds like your user doesn't have the permission to install packages in the system Python. You can probably install PIL for your system using aptitude. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From charlie.clark at clark-consulting.eu Thu Aug 4 21:28:21 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Thu, 04 Aug 2011 21:28:21 +0200 Subject: [Image-SIG] pil rotate 90 bug ? In-Reply-To: <4E312F4F.2030403@shef.ac.uk> References: <4E312F4F.2030403@shef.ac.uk> Message-ID: Am 28.07.2011, 11:43 Uhr, schrieb Jeremy Craven : > I have a program that has been working fine rotating images by arbitrary > angles. > I just found that if I specify 90 degrees exactly then the image goes > crazy: only appears in left hand half of image and every other line is > black and image is stretched vertically. > Any ideas if this is a bug or I am perhaps doing something in a > non-recommended way. > I attach a cut down version of the code which shows the problem. It > reads "test_in.tif". It rotates it 90.0 and writes "test.tif". It > rotates it 89.99 and writes "test1.tif". The second output file looks > fine. The first is wonky. Dear Jeremy, first off - it's extremely uncourteous to post such a large e-mail to a mailing list. Much better to put the attachments on a temporary site somewhere. Secondly, all the images are black to me so I can't see any difference between them. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From ggpolo at gmail.com Thu Aug 4 22:24:51 2011 From: ggpolo at gmail.com (Guilherme Polo) Date: Thu, 4 Aug 2011 17:24:51 -0300 Subject: [Image-SIG] pil rotate 90 bug ? In-Reply-To: <4E312F4F.2030403@shef.ac.uk> References: <4E312F4F.2030403@shef.ac.uk> Message-ID: 2011/7/28 Jeremy Craven : > I have a program that has been working fine rotating images by arbitrary > angles. > > I just found that if I specify 90 degrees exactly then the image goes crazy: > only appears in left hand half of image and every other line is black and > image is stretched vertically. > > Any ideas if this is a bug or I am perhaps doing something in a > non-recommended way. > It is a bug, it doesn't rotate the image by 90 degrees. Looking through PIL code, I would think the problem is that you have these "special images" with mode as "I;16B", which PIL marks as IMAGING_TYPE_SPECIAL. The code paths used for such special things probably are under tested. > I attach a cut down version of the code which shows the problem. It reads > "test_in.tif". It rotates it 90.0 and writes "test.tif". It rotates it 89.99 > and writes "test1.tif". The second output file looks fine. The first is > wonky. > > I'm using version 1.1.7 > > Thanks for listening > > Jeremy > > -- > ********************************************************************************* > > Dr C. Jeremy Craven > Department of Molecular Biology and Biotechnology > University of Sheffield, > Firth Court, Western Bank > S10 2TN Sheffield UK -- -- Guilherme H. Polo Goncalves From cannon.el at gmail.com Thu Aug 4 22:38:21 2011 From: cannon.el at gmail.com (Edward Cannon) Date: Thu, 4 Aug 2011 13:38:21 -0700 Subject: [Image-SIG] pil rotate 90 bug ? In-Reply-To: References: <4E312F4F.2030403@shef.ac.uk> Message-ID: <8AC16BE2-4290-44CD-97F4-20CFCAA7347F@gmail.com> A possible workaround is to convert the images to some more standard format ie im.convert("rgb"). If you need to rotate by multiples of 90 the transform method works and is faster. On Aug 4, 2011, at 1:24 PM, Guilherme Polo wrote: > 2011/7/28 Jeremy Craven : >> I have a program that has been working fine rotating images by arbitrary >> angles. >> >> I just found that if I specify 90 degrees exactly then the image goes crazy: >> only appears in left hand half of image and every other line is black and >> image is stretched vertically. >> >> Any ideas if this is a bug or I am perhaps doing something in a >> non-recommended way. >> > > It is a bug, it doesn't rotate the image by 90 degrees. > > Looking through PIL code, I would think the problem is that you have > these "special images" with mode as "I;16B", which PIL marks as > IMAGING_TYPE_SPECIAL. The code paths used for such special things > probably are under tested. > >> I attach a cut down version of the code which shows the problem. It reads >> "test_in.tif". It rotates it 90.0 and writes "test.tif". It rotates it 89.99 >> and writes "test1.tif". The second output file looks fine. The first is >> wonky. >> >> I'm using version 1.1.7 >> >> Thanks for listening >> >> Jeremy >> >> -- >> ********************************************************************************* >> >> Dr C. Jeremy Craven >> Department of Molecular Biology and Biotechnology >> University of Sheffield, >> Firth Court, Western Bank >> S10 2TN Sheffield UK > > > > -- > -- Guilherme H. Polo Goncalves > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From donn.ingle at gmail.com Fri Aug 5 11:26:28 2011 From: donn.ingle at gmail.com (donn) Date: Fri, 05 Aug 2011 11:26:28 +0200 Subject: [Image-SIG] pil rotate 90 bug ? In-Reply-To: <4E312F4F.2030403@shef.ac.uk> References: <4E312F4F.2030403@shef.ac.uk> Message-ID: <4E3BB744.4000402@gmail.com> Aw man, a 2.3mb email -- on my scant monthly b/w. Please don't do this on a list. Pretty please. \d From chris.mit7 at gmail.com Fri Aug 5 01:14:24 2011 From: chris.mit7 at gmail.com (Chris Mitchell) Date: Thu, 4 Aug 2011 19:14:24 -0400 Subject: [Image-SIG] pil rotate 90 bug ? In-Reply-To: <8AC16BE2-4290-44CD-97F4-20CFCAA7347F@gmail.com> References: <4E312F4F.2030403@shef.ac.uk> <8AC16BE2-4290-44CD-97F4-20CFCAA7347F@gmail.com> Message-ID: You could load the image into numpy, rotate the array, then read it back out to pil. On Aug 4, 2011 4:39 PM, "Edward Cannon" wrote: > A possible workaround is to convert the images to some more standard format ie im.convert("rgb"). If you need to rotate by multiples of 90 the transform method works and is faster. > > > > On Aug 4, 2011, at 1:24 PM, Guilherme Polo wrote: > >> 2011/7/28 Jeremy Craven : >>> I have a program that has been working fine rotating images by arbitrary >>> angles. >>> >>> I just found that if I specify 90 degrees exactly then the image goes crazy: >>> only appears in left hand half of image and every other line is black and >>> image is stretched vertically. >>> >>> Any ideas if this is a bug or I am perhaps doing something in a >>> non-recommended way. >>> >> >> It is a bug, it doesn't rotate the image by 90 degrees. >> >> Looking through PIL code, I would think the problem is that you have >> these "special images" with mode as "I;16B", which PIL marks as >> IMAGING_TYPE_SPECIAL. The code paths used for such special things >> probably are under tested. >> >>> I attach a cut down version of the code which shows the problem. It reads >>> "test_in.tif". It rotates it 90.0 and writes "test.tif". It rotates it 89.99 >>> and writes "test1.tif". The second output file looks fine. The first is >>> wonky. >>> >>> I'm using version 1.1.7 >>> >>> Thanks for listening >>> >>> Jeremy >>> >>> -- >>> ********************************************************************************* >>> >>> Dr C. Jeremy Craven >>> Department of Molecular Biology and Biotechnology >>> University of Sheffield, >>> Firth Court, Western Bank >>> S10 2TN Sheffield UK >> >> >> >> -- >> -- Guilherme H. Polo Goncalves >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingo at quitch.net Tue Aug 9 18:18:42 2011 From: ingo at quitch.net (Ingo Randolf) Date: Tue, 9 Aug 2011 18:18:42 +0200 Subject: [Image-SIG] PIL for python 3.2 Message-ID: hello. i want to use PIL with python 3.2. Any ideas when PIL will be available for python32? thanks ingo From spoon.reloaded at gmail.com Fri Aug 12 05:16:45 2011 From: spoon.reloaded at gmail.com (Spoon Reloaded) Date: Thu, 11 Aug 2011 20:16:45 -0700 Subject: [Image-SIG] Difference between ImageOps.invert() and ImageChops.invert()? Message-ID: Don't the methods ImageOps.invert() and ImageChops.invert() do the same thing? If so, why do we need two different implementations (the latter calls a C function while the former builds a lookup table and uses the image transforming functions)? It seems to me that if they do the same thing then one should call the other or something. From gregcorradini at gmail.com Sun Aug 7 18:09:02 2011 From: gregcorradini at gmail.com (Greg Corradini) Date: Sun, 7 Aug 2011 09:09:02 -0700 Subject: [Image-SIG] Scan Image for blank spots using PIL Message-ID: Hello, I want to use PIL to scan a newly created image for possible corrupt (blank) pixels. The PIL documentation doesn't seem to mention what value a blank pixel might have (I assume it would come back as None). I'm not sure what to test for. I see the Image module has a verify function, but I'm not sure if that covers validating that pixels are not blank. Any ideas? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregcorradini at gmail.com Sun Aug 7 20:06:34 2011 From: gregcorradini at gmail.com (Greg Corradini) Date: Sun, 7 Aug 2011 11:06:34 -0700 Subject: [Image-SIG] Scan Image for Blank Spots using PIL Message-ID: Hello, I want to use PIL to scan a newly created image for possible corrupt (blank) pixels. The PIL documentation doesn't seem to mention what value a blank pixel might have (I assume it would come back as None). I'm not sure what to test for. I see the Image module has a verify function, but I'm not sure if that covers validating that pixels are not blank. Any ideas? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From simonf at simonf.com Mon Aug 8 20:33:00 2011 From: simonf at simonf.com (Simon (Vsevolod) Ilyushchenko) Date: Mon, 8 Aug 2011 11:33:00 -0700 Subject: [Image-SIG] 16-bit signed tiffs Message-ID: Hi, I've tried to read a tiff file of type Int16 (signed int). PIL is able to open a file, but can't read any data from it due to an unknown mode. Indeed, Storage.c only recognizes the following 16-bit modes: I;16, I;16L, I;16B. However, TiffImagePlugin.py thinks the mode should be I;16S. Is this a known mismatch? Is it enough to just add I;16S to the check in Storage.c, or is there more coding needed to make it really support signed ints? Thanks, Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From jwt at OnJapan.net Mon Aug 15 01:21:51 2011 From: jwt at OnJapan.net (Jim Tittsler) Date: Mon, 15 Aug 2011 11:21:51 +1200 Subject: [Image-SIG] Scan Image for blank spots using PIL In-Reply-To: References: Message-ID: <4E48588F.2080803@OnJapan.net> On 2011-08-08 04:09, Greg Corradini wrote: > I want to use PIL to scan a newly created image for possible corrupt > (blank) pixels. > > The PIL documentation doesn't seem to mention what value a blank pixel > might have (I assume it would come back as None). I'm not sure what to > test for. It is going to depend on (a) the format of the image file and (b) your definition of what a "blank pixel" is. (Black? White? Something else?) You could do a brute force check of each pixel's value, or depending on your definition, you might be able to use something like the histogram method to see if any pixels meet your criteria. > I see the Image module has a verify function > , but I'm not > sure if that covers validating that pixels are not blank. I believe it only detects if PIL will be able to load the specified image file. -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/crew/jwt/ Mailman IRC irc://irc.freenode.net/#mailman From gregcorradini at gmail.com Mon Aug 15 05:12:26 2011 From: gregcorradini at gmail.com (Greg Corradini) Date: Sun, 14 Aug 2011 20:12:26 -0700 Subject: [Image-SIG] Scan Image for blank spots using PIL In-Reply-To: <4E48588F.2080803@OnJapan.net> References: <4E48588F.2080803@OnJapan.net> Message-ID: Thanks Jim. Comments below. > It is going to depend on (a) the format of the image file and (b) your > definition of what a "blank pixel" is. (Black? White? Something else?) I'm testing RGBA png(s) for blank spots. Considering that each band except the Alpha band in my image has black and white min/max values, then I'm guessing that any minimum Alpha values of black (0) indicate a blank spot (this is only a guess and I'm always open to better educated guesses ;-) ). Here is the extrema min/max output for each band before editing a png: >>> import ImageStat >>> stat = ImageStat.Stat(img) >>> stat.extrema [(0, 255), (0, 255), (0, 255), (191, 255)] After using Gimp to erase cells from the png, the extrema min/max output looks like this: >>> stat.extrema [(0, 255), (0, 255), (0, 255), (0, 255)] So i guess I'll test for that > You could do a brute force check of each pixel's value, or depending on > your definition, you might be able to use something like the histogram > method to see if any pixels meet your criteria. On Sun, Aug 14, 2011 at 4:21 PM, Jim Tittsler wrote: > On 2011-08-08 04:09, Greg Corradini wrote: > > I want to use PIL to scan a newly created image for possible corrupt > > (blank) pixels. > > > > The PIL documentation doesn't seem to mention what value a blank pixel > > might have (I assume it would come back as None). I'm not sure what to > > test for. > > It is going to depend on (a) the format of the image file and (b) your > definition of what a "blank pixel" is. (Black? White? Something else?) > > You could do a brute force check of each pixel's value, or depending on > your definition, you might be able to use something like the histogram > method to see if any pixels meet your criteria. > > > I see the Image module has a verify function > > , but I'm not > > sure if that covers validating that pixels are not blank. > > I believe it only detects if PIL will be able to load the specified > image file. > > > -- > Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 > Python Starship http://Starship.Python.net/crew/jwt/ > Mailman IRC irc://irc.freenode.net/#mailman > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > -- Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andrew_Seymour at scee.net Tue Aug 16 12:51:10 2011 From: Andrew_Seymour at scee.net (Andrew_Seymour at scee.net) Date: Tue, 16 Aug 2011 11:51:10 +0100 Subject: [Image-SIG] PIL and Maya 64bit Message-ID: Hi, I've integrated PIL into some of our tools for Maya. In particular I use it to create 16bit TIFFs. In Maya 2010 64 bit which I believe uses Python 2.6.1 everything worked fine. I got compiled versions of PIL from: http://www.lfd.uci.edu/~gohlke/pythonlibs/ which worked great. I'm now preparing to move to the latest version of 64bit Maya which I believe uses Python 2.6.4. I'm having problems with importing the _imaging module. With the path added to the system path I first got this error: # Error: ImportError: file line 7: DLL load failed: The specified module could not be found. # I then used dependency walker to try and find out what was missing. I then tried to include a 64 bit version of msvcr90.dll in the PIL directory. This resulted in the following error: # Error: ImportError: file line 1: DLL load failed: A dynamic link library (DLL) initialization routine failed. # I personally don't have the know how or software to compile PIL locally as I am a Technical Artist and not a fully blown programmer. Can you help or advise? Am I on the right track with the msvcr90.dll? Andrew Seymour Principal Technical Artist Sony Computer Entertainment Europe Limited http://eu.playstation.com ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster at scee.net This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** P Please consider the environment before printing this e-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 14523 bytes Desc: not available URL: From aaronichie2000 at gmail.com Wed Aug 17 14:40:27 2011 From: aaronichie2000 at gmail.com (AARON NICHIE) Date: Wed, 17 Aug 2011 12:40:27 +0000 Subject: [Image-SIG] Help Message-ID: Having a little problem adding certain support to mine PIL in Ubuntu 11.04. The test gives: --- PIL CORE support ok *** TKINTER support not installed *** JPEG support not installed *** ZLIB (PNG/ZIP) support not installed *** FREETYPE2 support not installed --- LITTLECMS support ok Running selftest: ***************************************************************** Failure in example: try: _info(Image.open(os.path.join(ROOT, "Images/lena.jpg"))) except IOError, v: print v from line #24 of selftest.testimage Expected: ('JPEG', 'RGB', (128, 128)) Got: decoder jpeg not available 1 items had failures: 1 of 57 in selftest.testimage ***Test Failed*** 1 failures. *** 1 tests of 57 failed. Any help for me???????????/ -- Aaron Nichie University of Ghana Computer Engineering -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andrew_Seymour at scee.net Wed Aug 17 15:24:29 2011 From: Andrew_Seymour at scee.net (Andrew_Seymour at scee.net) Date: Wed, 17 Aug 2011 14:24:29 +0100 Subject: [Image-SIG] Help with PIL on 64 bit Windows 7 and Maya Message-ID: Hi, I've integrated PIL into some of our tools for Maya. In particular I use it to create 16bit TIFFs. In Maya 2010 64 bit which I believe uses Python 2.6.1 everything worked fine. I got compiled versions of PIL from: http://www.lfd.uci.edu/~gohlke/pythonlibs/ which worked great. I'm now preparing to move to the latest version of 64bit Maya which I believe uses Python 2.6.4. I'm having problems with importing the _imaging module. With the path added to the system path I first got this error: # Error: ImportError: file line 7: DLL load failed: The specified module could not be found. # I then used dependency walker to try and find out what was missing. I then tried to include a 64 bit version of msvcr90.dll in the PIL directory. This resulted in the following error: # Error: ImportError: file line 1: DLL load failed: A dynamic link library (DLL) initialization routine failed. # Windows Error: Microsoft Visual C++ Runtime Errror! R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. Looking a little deeper PIL worked fine in 64 bit with Python 2.6.4 that I installed for windows from the python site: Installed: Python 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 bit (AMD64)] on win32 But, with Maya the compiled python included looks slightly different: Maya: Python 2.6.4 (r264:75706, May 19 2011, 13:53:43) [MSC v.1600 64 bit (AMD64)] on win32 Would this be the reason behind the issues, and if so is there a process I can follow to fix it? I personally don't have the know how or software to compile PIL locally as I am a Technical Artist and not a fully blown programmer, so any help would be greatly appreciated. Can you help or advise? Andrew Seymour Principal Technical Artist Sony Computer Entertainment Europe Limited http://eu.playstation.com ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster at scee.net This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** P Please consider the environment before printing this e-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From mauricio at marcan.me Wed Aug 17 18:38:48 2011 From: mauricio at marcan.me (Mauricio Martinez) Date: Wed, 17 Aug 2011 11:38:48 -0500 Subject: [Image-SIG] Help inmstalling Python Imaging Library in mac os 10, 7 Message-ID: <7E6D8596-9184-4BF8-9A88-0C5A7BD588A5@marcan.me> Hi I want to install the Python Imaging Library in my mac 10,7 but I have 0 skills with code and terminal, could won give me precise instructions on how to install it. Thanks for the amazon job you are doing. regards Mauricio From cgohlke at uci.edu Thu Aug 18 03:03:17 2011 From: cgohlke at uci.edu (Christoph Gohlke) Date: Wed, 17 Aug 2011 18:03:17 -0700 Subject: [Image-SIG] Help with PIL on 64 bit Windows 7 and Maya In-Reply-To: References: Message-ID: <4E4C64D5.1060703@uci.edu> Dear Andrew, apparently the new version of Maya includes a custom version of Python, which is built with the Visual Studio 2010 compiler (version 16) and the MSVCR10 C runtime library. The standard CPython 2.6 distribution, and almost all existing extension package binaries, use the Visual Studio 2008 compiler and the MSVCR90 C runtime library. The correct solution would be to build PIL with the Visual Studio 2010 compiler and link against the custom python26.lib from Maya. As a workaround you could try to provide an external msvcr90 manifest file for the existing PIL pyd extensions. This might not work correctly because the use of different C runtime libraries in one process can cause crashes or memory corruptions. Christoph On 8/17/2011 6:24 AM, Andrew_Seymour at scee.net wrote: > Hi, > > I've integrated PIL into some of our tools for Maya. In particular I use > it to create 16bit TIFFs. > > In Maya 2010 64 bit which I believe uses Python 2.6.1 everything worked > fine. I got compiled versions of PIL from: > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > > which worked great. > > I'm now preparing to move to the latest version of 64bit Maya which I > believe uses Python 2.6.4. > > I'm having problems with importing the _imaging module. > > With the path added to the system path I first got this error: > > # Error: ImportError: file line 7: DLL load failed: The > specified module could not be found. # > > I then used dependency walker to try and find out what was missing. I > then tried to include a 64 bit version of msvcr90.dll in the PIL directory. > This resulted in the following error: > > # Error: ImportError: file line 1: DLL load failed: A > dynamic link library (DLL) initialization routine failed. # > > Windows Error: > > Microsoft Visual C++ Runtime Errror! > R6034 > An application has made an attempt to load the C runtime library > incorrectly. > Please contact the application's support team for more information. > > > > Looking a little deeper PIL worked fine in 64 bit with Python 2.6.4 that > I installed for windows from the python site: > Installed: *Python 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 > 64 bit (AMD64)] on win32* > > But, with Maya the compiled python included looks slightly different: > Maya: *Python 2.6.4 (r264:75706, May 19 2011, 13:53:43) [MSC v.1600 64 > bit (AMD64)] on win32* > > Would this be the reason behind the issues, and if so is there a process > I can follow to fix it? > > > I personally don't have the know how or software to compile PIL locally > as I am a Technical Artist and not a fully blown programmer, so any help > would be greatly appreciated. > > Can you help or advise? > > Andrew Seymour > Principal Technical Artist > Sony Computer Entertainment Europe Limited > http://eu.playstation.com > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they are > addressed. If you have received this email in error please notify > postmaster at scee.net > This footnote also confirms that this email message has been checked for > all known viruses. > Sony Computer Entertainment Europe Limited > Registered Office: 10 Great Marlborough Street, London W1F 7LP, United > Kingdom > Registered in England: 3277793 > ********************************************************************** > > P */Please consider the environment before printing this e-mail/* > > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From john at johnnypops.co.uk Thu Aug 18 01:48:40 2011 From: john at johnnypops.co.uk (John Popplewell) Date: Thu, 18 Aug 2011 00:48:40 +0100 Subject: [Image-SIG] Support for RLE8/4 MS BMP files Message-ID: <20110817235534@johnnypops.co.uk> Hi all, my first post to this list. I'm a fairly long-time Python user, mostly on Windows systems (sigh), and use PIL extensively. Recently, an application of mine, used by one of my customers, encountered a series of MS BMP files masquerading as JPEG images. Most of them loaded OK, but about 50 of them (out of ~10,000) wouldn't - they turned out to be RLE8 encoded. We have no control over what we are sent, and a possible work-round, using wxPython, didn't work-out as it's also a really old version. As I've come across a few RLE BMP images over the years, and I really needed it to work for my customer, I decided to add the functionality to PIL. For various practical reasons, the application is stuck using Python-2.3, PIL-1.1.4 and wxPython-2.4, so I had fun re-installing Visual Studio 6, building zlib and libjpeg and getting PIL to compile. I got a basic RLE8 decoder working quite quickly, and looked around for test-images, finding these: http://entropymine.com/jason/bmpsuite/ http://bmptestsuite.sourceforge.net/ I also noticed that the Mozilla Firefox project had added extensive BMP support: https://bugzilla.mozilla.org/show_bug.cgi?id=108271 and turned out to handle all the test images. Anyway, lets just say I got a bit carried away and added support for RLE8 and RLE4 compression as well for a few oddities, finding a couple of (fixed) bugs in PIL-1.1.4 in the process. One of the test images, 'width-times-height-overflow.bmp', still causes a nasty seg-fault in PIL-1.1.7. I've got a current HG version of PIL and I'm building with MSVC on XP, but I can test on Linux too. My question is, how do I go about contibuting my new 'BmpRleDecode.c' and associated changes? best regards, John Popplewell. From charlie.clark at clark-consulting.eu Thu Aug 18 14:26:17 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Thu, 18 Aug 2011 14:26:17 +0200 Subject: [Image-SIG] Help In-Reply-To: References: Message-ID: Dear Aaron, Am 17.08.2011, 14:40 Uhr, schrieb AARON NICHIE : > Having a little problem adding certain support to mine PIL in Ubuntu > 11.04. > The test gives: > --- PIL CORE support ok > *** TKINTER support not installed > *** JPEG support not installed > *** ZLIB (PNG/ZIP) support not installed > *** FREETYPE2 support not installed > --- LITTLECMS support ok Above is a list of libraries that PIL needs to be able to provide full functionality. You need to install at least libjpeg to be able to work with JPG files. You can install the libraries using the relevent software manager in Ubuntu. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From charlie.clark at clark-consulting.eu Thu Aug 18 14:27:48 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Thu, 18 Aug 2011 14:27:48 +0200 Subject: [Image-SIG] Help inmstalling Python Imaging Library in mac os 10, 7 In-Reply-To: <7E6D8596-9184-4BF8-9A88-0C5A7BD588A5@marcan.me> References: <7E6D8596-9184-4BF8-9A88-0C5A7BD588A5@marcan.me> Message-ID: Am 17.08.2011, 18:38 Uhr, schrieb Mauricio Martinez : > Hi I want to install the Python Imaging Library in my mac 10,7 but I > have 0 skills with code and terminal, could won give me precise > instructions on how to install it. > Thanks for the amazon job you are doing. Dear Mauricio, assuming you have already installed Python your best bet is to enter: sudo pip install pillow In Terminal Charlie Clark -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From ingo at quitch.net Tue Aug 23 14:29:33 2011 From: ingo at quitch.net (Ingo Randolf) Date: Tue, 23 Aug 2011 14:29:33 +0200 Subject: [Image-SIG] PIL for python 3.2 In-Reply-To: References: Message-ID: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> hi all. i had a look into porting PIL for use with python 3.2 well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback: Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open raise IOError("cannot identify image file") IOError: cannot identify image file this happens with any image-kind... i am new to python, and to PIL... so i have no idea why this happens... it would be great if PIL would be able to be used with python3.2! maybe somebody more skilled than me can make it run? here is the modified version: http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip ingo Am 09.08.2011 um 18:18 schrieb Ingo Randolf: > hello. > > i want to use PIL with python 3.2. > Any ideas when PIL will be available for python32? > > thanks > ingo > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From ingo at quitch.net Fri Aug 26 17:19:21 2011 From: ingo at quitch.net (Ingo Randolf) Date: Fri, 26 Aug 2011 17:19:21 +0200 Subject: [Image-SIG] PIL for python 3.2 In-Reply-To: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> References: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> Message-ID: <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> Hello. another attempt to make PIL run with python3.2 on osx 10.6.7 I found an unofficial release of PIL for py3.2: https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb it compiles and installs fine with python3.2 when i want to open an image i get: IOError: cannot identify image file with any type of image... compiling PIL says: --- TKINTER support ok --- JPEG support ok --- ZLIB (PNG/ZIP) support ok --- FREETYPE2 support ok i do: >>> from PIL import Image >>> im = Image.open("path/to/my/image.jpg") i am on: osx 10.6.7 what am i doing wrong? please help. thanks ingo Am 23.08.2011 um 14:29 schrieb Ingo Randolf: > hi all. > > i had a look into porting PIL for use with python 3.2 > > well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback: > > Traceback (most recent call last): > File "", line 1, in > File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open > raise IOError("cannot identify image file") > IOError: cannot identify image file > > this happens with any image-kind... > > i am new to python, and to PIL... so i have no idea why this happens... > > it would be great if PIL would be able to be used with python3.2! > > maybe somebody more skilled than me can make it run? > > here is the modified version: > http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip > > ingo > > > > Am 09.08.2011 um 18:18 schrieb Ingo Randolf: > >> hello. >> >> i want to use PIL with python 3.2. >> Any ideas when PIL will be available for python32? >> >> thanks >> ingo >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From charlie.clark at clark-consulting.eu Fri Aug 26 17:42:54 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Fri, 26 Aug 2011 17:42:54 +0200 Subject: [Image-SIG] PIL for python 3.2 In-Reply-To: <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> References: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> Message-ID: Am 26.08.2011, 17:19 Uhr, schrieb Ingo Randolf : > Hello. > another attempt to make PIL run with python3.2 on osx 10.6.7 > I found an unofficial release of PIL for py3.2: > https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb > it compiles and installs fine with python3.2 Hi Ingo, for support on the fork you should contact it's developer. You might need to create a debug build of Python to find out exactly what's not working. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From Chris.Barker at noaa.gov Fri Aug 26 17:37:35 2011 From: Chris.Barker at noaa.gov (Chris.Barker) Date: Fri, 26 Aug 2011 08:37:35 -0700 Subject: [Image-SIG] PIL for python 3.2 In-Reply-To: <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> References: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> Message-ID: <4E57BDBF.7040000@noaa.gov> On 8/26/11 8:19 AM, Ingo Randolf wrote: > another attempt to make PIL run with python3.2 on osx 10.6.7 > > I found an unofficial release of PIL for py3.2: > https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb > > it compiles and installs fine with python3.2 > > when i want to open an image i get: > IOError: cannot identify image file IIRC, PIL comes with some test code that you can run that tests the C directly, outside of Python --have you tried that? It may give you some hints. Other than that, you are in uncharted waters -- I'd try asking the author of that port. Otherwise, it seems unlikely that we will have a robust PIL on 3.* until Fredrik gets directly involved :-( -Chris > with any type of image... > > compiling PIL says: > --- TKINTER support ok > --- JPEG support ok > --- ZLIB (PNG/ZIP) support ok > --- FREETYPE2 support ok > > > i do: >>>> from PIL import Image >>>> im = Image.open("path/to/my/image.jpg") > > i am on: osx 10.6.7 > > what am i doing wrong? > > > please help. > thanks > ingo > > > Am 23.08.2011 um 14:29 schrieb Ingo Randolf: > >> hi all. >> >> i had a look into porting PIL for use with python 3.2 >> >> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback: >> >> Traceback (most recent call last): >> File "", line 1, in >> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open >> raise IOError("cannot identify image file") >> IOError: cannot identify image file >> >> this happens with any image-kind... >> >> i am new to python, and to PIL... so i have no idea why this happens... >> >> it would be great if PIL would be able to be used with python3.2! >> >> maybe somebody more skilled than me can make it run? >> >> here is the modified version: >> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip >> >> ingo >> >> >> >> Am 09.08.2011 um 18:18 schrieb Ingo Randolf: >> >>> hello. >>> >>> i want to use PIL with python 3.2. >>> Any ideas when PIL will be available for python32? >>> >>> thanks >>> ingo >>> _______________________________________________ >>> Image-SIG maillist - Image-SIG at python.org >>> http://mail.python.org/mailman/listinfo/image-sig >> >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From cgohlke at uci.edu Fri Aug 26 19:03:04 2011 From: cgohlke at uci.edu (Christoph Gohlke) Date: Fri, 26 Aug 2011 10:03:04 -0700 Subject: [Image-SIG] PIL for python 3.2 In-Reply-To: <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> References: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> Message-ID: <4E57D1C8.4000809@uci.edu> Hi Ingo, Before attempting to build PIL for Python 3.x make sure you are able to correctly build PIL for Python 2.x from the official source distribution. All tests should pass. python setup.py clean --all python make-manifest.py python setup.py build_ext -i python selftest.py python Tests\run.py Consider using PIL-1.1.7-py3-source.zip from . It builds and passes all selftests on my Windows and Ubuntu systems. Christoph On 8/26/2011 8:19 AM, Ingo Randolf wrote: > Hello. > > another attempt to make PIL run with python3.2 on osx 10.6.7 > > I found an unofficial release of PIL for py3.2: > https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb > > it compiles and installs fine with python3.2 > > when i want to open an image i get: > IOError: cannot identify image file > > with any type of image... > > compiling PIL says: > --- TKINTER support ok > --- JPEG support ok > --- ZLIB (PNG/ZIP) support ok > --- FREETYPE2 support ok > > > i do: >>>> from PIL import Image >>>> im = Image.open("path/to/my/image.jpg") > > i am on: osx 10.6.7 > > what am i doing wrong? > > > please help. > thanks > ingo > > > Am 23.08.2011 um 14:29 schrieb Ingo Randolf: > >> hi all. >> >> i had a look into porting PIL for use with python 3.2 >> >> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback: >> >> Traceback (most recent call last): >> File "", line 1, in >> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open >> raise IOError("cannot identify image file") >> IOError: cannot identify image file >> >> this happens with any image-kind... >> >> i am new to python, and to PIL... so i have no idea why this happens... >> >> it would be great if PIL would be able to be used with python3.2! >> >> maybe somebody more skilled than me can make it run? >> >> here is the modified version: >> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip >> >> ingo >> >> >> >> Am 09.08.2011 um 18:18 schrieb Ingo Randolf: >> >>> hello. >>> >>> i want to use PIL with python 3.2. >>> Any ideas when PIL will be available for python32? >>> >>> thanks >>> ingo >>> _______________________________________________ >>> Image-SIG maillist - Image-SIG at python.org >>> http://mail.python.org/mailman/listinfo/image-sig >> >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > > From aaronichie2000 at gmail.com Thu Aug 18 14:53:21 2011 From: aaronichie2000 at gmail.com (AARON NICHIE) Date: Thu, 18 Aug 2011 12:53:21 +0000 Subject: [Image-SIG] help Message-ID: Libraries for PIL are installed but test cannot find it. Any help??? -------------------------------------------------------------------- PIL 1.1.7 TEST SUMMARY -------------------------------------------------------------------- Python modules loaded from ./PIL Binary modules loaded from ./PIL -------------------------------------------------------------------- --- PIL CORE support ok *** TKINTER support not installed *** JPEG support not installed *** ZLIB (PNG/ZIP) support not installed *** FREETYPE2 support not installed --- LITTLECMS support ok -------------------------------------------------------------------- Running selftest: ***************************************************************** Failure in example: try: _info(Image.open(os.path.join(ROOT, "Images/lena.jpg"))) except IOError, v: print v from line #24 of selftest.testimage Expected: ('JPEG', 'RGB', (128, 128)) Got: decoder jpeg not available 1 items had failures: 1 of 57 in selftest.testimage ***Test Failed*** 1 failures. *** 1 tests of 57 failed. -- Aaron Nichie University of Ghana Computer Engineering -------------- next part -------------- An HTML attachment was scrubbed... URL: From mit at mitayai.org Fri Aug 19 06:48:54 2011 From: mit at mitayai.org (Mitayai) Date: Fri, 19 Aug 2011 00:48:54 -0400 Subject: [Image-SIG] Help inmstalling Python Imaging Library in mac os 10, 7 In-Reply-To: References: <7E6D8596-9184-4BF8-9A88-0C5A7BD588A5@marcan.me> Message-ID: one way of getting pil and many other packages on OS 10.7 (Lion) is through mac ports. first grab xcode from the app store (free) so that you have a compiler then install mac ports from www.macports.org, open a terminal, and type: sudo port install py-pil On Thu, Aug 18, 2011 at 8:27 AM, Charlie Clark < charlie.clark at clark-consulting.eu> wrote: > Am 17.08.2011, 18:38 Uhr, schrieb Mauricio Martinez : > > > Hi I want to install the Python Imaging Library in my mac 10,7 but I have >> 0 skills with code and terminal, could won give me precise instructions on >> how to install it. >> Thanks for the amazon job you are doing. >> > > Dear Mauricio, > > assuming you have already installed Python your best bet is to enter: > > sudo pip install pillow > > In Terminal > > Charlie Clark > -- > Charlie Clark > Managing Director > Clark Consulting & Research > German Office > Helmholtzstr. 20 > D?sseldorf > D- 40215 > 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 > -- Mit Rowe Stagename, Inc. http://www.stagename.com mit at stagename.com Office: +1-866-326-3098xt102 Mobile: +1-416-219-2512 Fax: +1-416-533-3480 1 Atlantic Avenue, Suite 107 / Toronto, ON M6K 3E7 / Canada -------------- next part -------------- An HTML attachment was scrubbed... URL: From mit at mitayai.org Fri Aug 19 06:56:55 2011 From: mit at mitayai.org (Mitayai) Date: Fri, 19 Aug 2011 00:56:55 -0400 Subject: [Image-SIG] Help In-Reply-To: References: Message-ID: Are you installing this through packages? root at cache1:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=11.04 DISTRIB_CODENAME=natty DISTRIB_DESCRIPTION="Ubuntu 11.04" root at cache1:~# apt-get update [lots of output] root at cache1:~# apt-get install python-imaging Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libfreetype6 libjpeg62 liblcms1 Suggested packages: liblcms-utils python-imaging-doc python-imaging-dbg The following NEW packages will be installed: libfreetype6 libjpeg62 liblcms1 python-imaging 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 965 kB of archives. After this operation, 2,945 kB of additional disk space will be used. Do you want to continue [Y/n]? y [lots of output] On Wed, Aug 17, 2011 at 8:40 AM, AARON NICHIE wrote: > Having a little problem adding certain support to mine PIL in Ubuntu 11.04. > The test gives: > > --- PIL CORE support ok > *** TKINTER support not installed > *** JPEG support not installed > *** ZLIB (PNG/ZIP) support not installed > *** FREETYPE2 support not installed > --- LITTLECMS support ok > > Running selftest: > ***************************************************************** > Failure in example: > try: > _info(Image.open(os.path.join(ROOT, "Images/lena.jpg"))) > except IOError, v: > print v > from line #24 of selftest.testimage > Expected: ('JPEG', 'RGB', (128, 128)) > Got: decoder jpeg not available > 1 items had failures: > 1 of 57 in selftest.testimage > ***Test Failed*** 1 failures. > *** 1 tests of 57 failed. > > > Any help for me???????????/ > > -- > Aaron Nichie > University of Ghana > Computer Engineering > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > > -- Mit Rowe Stagename, Inc. http://www.stagename.com mit at stagename.com Office: +1-866-326-3098xt102 Mobile: +1-416-219-2512 Fax: +1-416-533-3480 1 Atlantic Avenue, Suite 107 / Toronto, ON M6K 3E7 / Canada -------------- next part -------------- An HTML attachment was scrubbed... URL: From fitzosity at gmail.com Wed Aug 24 21:13:41 2011 From: fitzosity at gmail.com (AJ Fitzgerald) Date: Wed, 24 Aug 2011 14:13:41 -0500 Subject: [Image-SIG] Installing PIL on Mac OS 10.5 Message-ID: Hi, I'm running Mac OS 10.5.8 with Python 2.7 installed. I've been trying to easy_install PIL 1.1.7 for use with Django but I'm getting this error: unable to execute gcc-4.0: No such file or directory error: command 'gcc-4.0' failed with exit status 1 Any suggestions? Thanks! AJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dale at blackbagtech.com Sat Aug 27 08:17:21 2011 From: dale at blackbagtech.com (Dale Cieslak) Date: Fri, 26 Aug 2011 23:17:21 -0700 Subject: [Image-SIG] Installing PIL on Mac OS 10.5 In-Reply-To: References: Message-ID: <94F0B1CD-7146-4693-A807-348D3DDD59FE@blackbagtech.com> Hi AJ, Do you have the Apple Developer tools installed? That's where gcc comes from. ~Dale On Aug 24, 2011, at 12:13 PM, AJ Fitzgerald wrote: > Hi, I'm running Mac OS 10.5.8 with Python 2.7 installed. I've been trying to easy_install PIL 1.1.7 for use with Django but I'm getting this error: > > unable to execute gcc-4.0: No such file or directory > error: command 'gcc-4.0' failed with exit status 1 > > Any suggestions? > > Thanks! > AJ > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3739 bytes Desc: not available URL: From ingo at quitch.net Mon Aug 29 16:46:25 2011 From: ingo at quitch.net (Ingo Randolf) Date: Mon, 29 Aug 2011 16:46:25 +0200 Subject: [Image-SIG] PIL for python 3.2 In-Reply-To: <4E57D1C8.4000809@uci.edu> References: <67A211AC-868A-440C-9093-8F8F6703F09A@quitch.net> <83BCB2B1-44D4-465D-A4A2-8188B8A5B15E@quitch.net> <4E57D1C8.4000809@uci.edu> Message-ID: Hello. Thanks for all the replies. it is working now! it turned out, that there was a problem with libjpeg... i found some resources concerning the topic pil on snow-leopard: http://stackoverflow.com/questions/1518573/snow-leopard-python-2-6-problems-getting-pil-to-work http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/ ---- what i did: - remove all the libjpeg.* in various folders: /sw/lib /opt/local/lib (attention you might break something if you do that...) - recompile and install libjpeg (8c) with ./configure --enable-shared --enable-static - recompile PIL (i finally used this source: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil) for non-windows version you have to alter the setup.py file though at the top you find: if sys.platform == "win32": after the if-block i added: else: FREETYPE_ROOT = None JPEG_ROOT = libinclude("/usr/local") TIFF_ROOT = None ZLIB_ROOT = None TCL_ROOT = None LCMS_ROOT = None see the JPEG_ROOT! - after recompiling PIL i checked if _imaging.so is linking to libjepg: $ otool -L build/lib.bla/_imaging.so /usr/local/lib/libjpeg.8.dylib (compatibility version 12.0.0, current version 12.0.0) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) so linking went fine. - after installing i could finally use PIL with python3.2 :) great! thx ingo Am 26.08.2011 um 19:03 schrieb Christoph Gohlke: > Hi Ingo, > > Before attempting to build PIL for Python 3.x make sure you are able to correctly build PIL for Python 2.x from the official source distribution. All tests should pass. > > python setup.py clean --all > python make-manifest.py > python setup.py build_ext -i > python selftest.py > python Tests\run.py > > Consider using PIL-1.1.7-py3-source.zip from . It builds and passes all selftests on my Windows and Ubuntu systems. > > Christoph > > > > On 8/26/2011 8:19 AM, Ingo Randolf wrote: >> Hello. >> >> another attempt to make PIL run with python3.2 on osx 10.6.7 >> >> I found an unofficial release of PIL for py3.2: >> https://github.com/sloonz/pil-py3k/tree/a75c372ed17b3d06c0d58c1db03c9215da9c4bbb >> >> it compiles and installs fine with python3.2 >> >> when i want to open an image i get: >> IOError: cannot identify image file >> >> with any type of image... >> >> compiling PIL says: >> --- TKINTER support ok >> --- JPEG support ok >> --- ZLIB (PNG/ZIP) support ok >> --- FREETYPE2 support ok >> >> >> i do: >>>>> from PIL import Image >>>>> im = Image.open("path/to/my/image.jpg") >> >> i am on: osx 10.6.7 >> >> what am i doing wrong? >> >> >> please help. >> thanks >> ingo >> >> >> Am 23.08.2011 um 14:29 schrieb Ingo Randolf: >> >>> hi all. >>> >>> i had a look into porting PIL for use with python 3.2 >>> >>> well, it does compile now (osx 10.6), i can import PIL in python3.2, but when i try to load an image i get this traceback: >>> >>> Traceback (most recent call last): >>> File "", line 1, in >>> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PIL/Image.py", line 1983, in open >>> raise IOError("cannot identify image file") >>> IOError: cannot identify image file >>> >>> this happens with any image-kind... >>> >>> i am new to python, and to PIL... so i have no idea why this happens... >>> >>> it would be great if PIL would be able to be used with python3.2! >>> >>> maybe somebody more skilled than me can make it run? >>> >>> here is the modified version: >>> http://www.bildstrom.at/dl/Imaging-1.1.7_3.2.zip >>> >>> ingo >>> >>> >>> >>> Am 09.08.2011 um 18:18 schrieb Ingo Randolf: >>> >>>> hello. >>>> >>>> i want to use PIL with python 3.2. >>>> Any ideas when PIL will be available for python32? >>>> >>>> thanks >>>> ingo >>>> _______________________________________________ >>>> Image-SIG maillist - Image-SIG at python.org >>>> http://mail.python.org/mailman/listinfo/image-sig >>> >>> _______________________________________________ >>> Image-SIG maillist - Image-SIG at python.org >>> http://mail.python.org/mailman/listinfo/image-sig >> >> _______________________________________________ >> Image-SIG maillist - Image-SIG at python.org >> http://mail.python.org/mailman/listinfo/image-sig >> >> > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From rowen at uw.edu Tue Aug 30 22:32:51 2011 From: rowen at uw.edu (Russell E. Owen) Date: Tue, 30 Aug 2011 13:32:51 -0700 Subject: [Image-SIG] Installing PIL on Mac OS 10.5 References: Message-ID: In article , AJ Fitzgerald wrote: > Hi, I'm running Mac OS 10.5.8 with Python 2.7 installed. I've been trying to > easy_install PIL 1.1.7 for use with Django but I'm getting this error: > > unable to execute gcc-4.0: No such file or directory > error: command 'gcc-4.0' failed with exit status 1 > > Any suggestions? If you are using Python from python.org then use my unofficial binary installer (I wish it was official, but the Frederik is apparently unwilling to serve it). If you want to build from source then you'll need to install XCode and the prerequisite libraries. My notes on that are: Install libjpeg or point the build system to the version in /usr/X11 Install freetype or point the build system to the version in /usr/X11 Install littleCMS (I installed version 1.19 because I could not build 2-2.0a) -- Russell From claudyus84 at gmail.com Wed Aug 31 14:03:39 2011 From: claudyus84 at gmail.com (Claudio) Date: Wed, 31 Aug 2011 14:03:39 +0200 Subject: [Image-SIG] Implement sobel filter Message-ID: Hi all, I'm tring to implement a sobel filter using PIL library with few success. Now I never used this library before so any help is appreciate. I wrote the following code that essential is a standard implementation of the sobel filter: input img, output dimg: dx = [-1, 0, 1, -2, 0, 2, -1, 0, 1] dy = [-1, -2, -1, 0, 0, 0, 1, 2, 1] ximg = img.filter(ImageFilter.Kernel((3,3), dx, None, 0)) #apply the kernel in x e y yimg = img.filter(ImageFilter.Kernel((3,3), dy, None, 0)) dimg = img.copy() dest = dimg.load() xdata = ximg.load() #retrieve the x e y data ydata = yimg.load() for y in range ( img.size[1]): # calcolo il gradiente per ogni punto for x in range( img.size[0]): # dest[x, y] = sqrt( xdata[x, y] * xdata[x, y] + ydata[x, y] * ydata[x, y]) dest[x, y] = abs( xdata[x, y] ) + abs (ydata[x, y]) The result is not what I expected, so I misunderstood some function usage? From ggpolo at gmail.com Wed Aug 31 15:50:01 2011 From: ggpolo at gmail.com (Guilherme Polo) Date: Wed, 31 Aug 2011 10:50:01 -0300 Subject: [Image-SIG] Implement sobel filter In-Reply-To: References: Message-ID: 2011/8/31 Claudio : > Hi all, > I'm tring to implement a sobel filter using PIL library with few success. > > Now I never used this library before so any help is appreciate. > I wrote the following code that essential is a standard implementation > of the sobel filter: > > input img, output dimg: > dx = [-1, ?0, ?1, -2, 0, 2, -1, 0, 1] > dy = [-1, -2, -1, ?0, 0, 0, ?1, 2, 1] > > ximg = img.filter(ImageFilter.Kernel((3,3), dx, None, 0)) #apply the > kernel in x e y > yimg = img.filter(ImageFilter.Kernel((3,3), dy, None, 0)) > > dimg = img.copy() > dest = dimg.load() > xdata = ximg.load() #retrieve the x e y data > ydata = yimg.load() > > for y in range ( img.size[1]): ? ? ? ? ? ? ? ? ?# calcolo il gradiente per ogni punto > ? ? ? ?for x in range( img.size[0]): > # ? ? ? ? ? ?dest[x, y] = sqrt( xdata[x, y] * xdata[x, y] + ydata[x, y] * ydata[x, y]) > ? ? ? ? ? ? dest[x, y] = abs( xdata[x, y] ) + abs (ydata[x, y]) > > The result is not what I expected, so I misunderstood some function usage? "not what I expected" is too vague. Maybe you have a 8 bits image and the convolution only uses 8 bits to store the results and then you get weird results ? -- -- Guilherme H. Polo Goncalves From ingo at quitch.net Wed Aug 31 16:21:46 2011 From: ingo at quitch.net (Ingo Randolf) Date: Wed, 31 Aug 2011 16:21:46 +0200 Subject: [Image-SIG] float rgba list -> Image Message-ID: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> Hi all. I have a list with float-values describing an image like this: [R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, ... etc.] the RGBA-values are from 0. - 1. is there a clever way to make a PIL-Image out of something like this? i played around with putdata... and came along with this, very, very slow solution: px = list-of-rgba-values-as-floats img = the-image #make int-tuples newdata = [(int(px[(x*4)]*255), int(px[(x*4)+1]*255), int(px[(x*4)+2]*255), int(px[(x*4)+3]*255)) for x in range( img.size[0] * img.size[1] )] Image.putdata(newdata) well i never saw a result, because it took too long for my short patience... ;) i also tried to set the values pixel-wise... this is also very, very slow... how to do that in a more clever way? thanks for any hints inx From charlesc-pyimagesig at pyropus.ca Wed Aug 31 16:43:17 2011 From: charlesc-pyimagesig at pyropus.ca (Charles Cazabon) Date: Wed, 31 Aug 2011 08:43:17 -0600 Subject: [Image-SIG] float rgba list -> Image In-Reply-To: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> References: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> Message-ID: <20110831144317.GA30669@pyropus.ca> Ingo Randolf wrote: > > I have a list with float-values describing an image like this: > [R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, ... etc.] > > the RGBA-values are from 0. - 1. > > is there a clever way to make a PIL-Image out of something like this? PIL.Image.fromstring() is probably your best bet. Charles -- ------------------------------------------------------------------ Charles Cazabon Software, consulting, and services available at http://pyropus.ca/ ------------------------------------------------------------------ From charlie.clark at clark-consulting.eu Wed Aug 31 17:06:37 2011 From: charlie.clark at clark-consulting.eu (Charlie Clark) Date: Wed, 31 Aug 2011 17:06:37 +0200 Subject: [Image-SIG] float rgba list -> Image In-Reply-To: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> References: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> Message-ID: Am 31.08.2011, 16:21 Uhr, schrieb Ingo Randolf : > Hi all. > I have a list with float-values describing an image like this: > [R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, ... etc.] > the RGBA-values are from 0. - 1. > is there a clever way to make a PIL-Image out of something like this? > i played around with putdata... and came along with this, very, very > slow solution: > px = list-of-rgba-values-as-floats > img = the-image > #make int-tuples > newdata = [(int(px[(x*4)]*255), int(px[(x*4)+1]*255), > int(px[(x*4)+2]*255), int(px[(x*4)+3]*255)) for x in range( img.size[0] > * img.size[1] )] > Image.putdata(newdata) > well i never saw a result, because it took too long for my short > patience... You can turn that list into a list of tuples for each pixel like this new_array = [] for idx in range(0, len(l), 4) new_array.append(tuple(l[idx:idx+4])) You can probably wrap this in some functional programming so that you are not using memory for transitional data structures. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 From ggpolo at gmail.com Wed Aug 31 17:06:07 2011 From: ggpolo at gmail.com (Guilherme Polo) Date: Wed, 31 Aug 2011 12:06:07 -0300 Subject: [Image-SIG] Implement sobel filter In-Reply-To: References: Message-ID: 2011/8/31 Claudio : > 2011/8/31 Guilherme Polo : >> 2011/8/31 Claudio : >>> Hi all, >>> I'm tring to implement a sobel filter using PIL library with few success. >>> >>> Now I never used this library before so any help is appreciate. >>> I wrote the following code that essential is a standard implementation >>> of the sobel filter: >>> >>> input img, output dimg: >>> dx = [-1, ?0, ?1, -2, 0, 2, -1, 0, 1] >>> dy = [-1, -2, -1, ?0, 0, 0, ?1, 2, 1] >>> >>> ximg = img.filter(ImageFilter.Kernel((3,3), dx, None, 0)) #apply the >>> kernel in x e y >>> yimg = img.filter(ImageFilter.Kernel((3,3), dy, None, 0)) >>> >>> dimg = img.copy() >>> dest = dimg.load() >>> xdata = ximg.load() #retrieve the x e y data >>> ydata = yimg.load() >>> >>> for y in range ( img.size[1]): ? ? ? ? ? ? ? ? ?# calcolo il gradiente per ogni punto >>> ? ? ? ?for x in range( img.size[0]): >>> # ? ? ? ? ? ?dest[x, y] = sqrt( xdata[x, y] * xdata[x, y] + ydata[x, y] * ydata[x, y]) >>> ? ? ? ? ? ? dest[x, y] = abs( xdata[x, y] ) + abs (ydata[x, y]) >>> >>> The result is not what I expected, so I misunderstood some function usage? >> >> "not what I expected" is too vague. Maybe you have a 8 bits image and > > Ok that's true, I was too vague. > So using the same photo of the stream engine that is on wikipedia [1] > I obtain this image: > ?https://www.mignanti.eu/articoli/tmp > >> the convolution only uses 8 bits to store the results and then you get >> weird results ? > > Well, I'm working on grayscale image but the results should be in the > same domain. > Do you want something like http://i.imgur.com/Ij6s6.png (res1) or http://imgur.com/kTBLK (res2) ? # orig is your RGB image, I don't know how you wish to handle the bands img = ImageOps.grayscale(orig) dxn = scipy.signal.convolve2d(numpy.array(img), [[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]) dyn = scipy.signal.convolve2d(numpy.array(img), [[-1, -2, -1], [0, 0, 0], [1, 2, 1]]) resn = dxn + dyn a = 255. / (resn.max() - resn.min()) b = -a * resn.min() # cap is a function that returns 0 if a point is below 0 and # returns 255 if a point is above 255 res1 = Image.fromarray(numpy.uint8((resn * a + b).round())) res2 = Image.fromarray(numpy.uint8((cap(resn)).round())) Now I see that I'm very naive with PIL, I don't know how to achieve exactly the same result using only PIL. -- -- Guilherme H. Polo Goncalves From cgohlke at uci.edu Wed Aug 31 18:27:34 2011 From: cgohlke at uci.edu (Christoph Gohlke) Date: Wed, 31 Aug 2011 09:27:34 -0700 Subject: [Image-SIG] float rgba list -> Image In-Reply-To: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> References: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> Message-ID: <4E5E60F6.3020902@uci.edu> On 8/31/2011 7:21 AM, Ingo Randolf wrote: > Hi all. > > I have a list with float-values describing an image like this: > [R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, ... etc.] > > the RGBA-values are from 0. - 1. > > is there a clever way to make a PIL-Image out of something like this? > > > i played around with putdata... and came along with this, very, very slow solution: > > px = list-of-rgba-values-as-floats > img = the-image > > #make int-tuples > newdata = [(int(px[(x*4)]*255), int(px[(x*4)+1]*255), int(px[(x*4)+2]*255), int(px[(x*4)+3]*255)) for x in range( img.size[0] * img.size[1] )] > Image.putdata(newdata) > > > well i never saw a result, because it took too long for my short patience... ;) > > > i also tried to set the values pixel-wise... this is also very, very slow... > > > how to do that in a more clever way? > > thanks for any hints > inx > > Consider using numpy and Image.fromarray. For example: import numpy from PIL import Image shape = 256, 256, 4 px = list(numpy.random.rand(shape[0]*shape[1]*shape[2])) newdata = numpy.array(px, dtype=numpy.float32) newdata *= 255.99998474 newdata = newdata.astype(numpy.uint8) newdata.shape = shape image = Image.fromarray(newdata) Christoph From Chris.Barker at noaa.gov Wed Aug 31 20:51:24 2011 From: Chris.Barker at noaa.gov (Chris.Barker) Date: Wed, 31 Aug 2011 11:51:24 -0700 Subject: [Image-SIG] float rgba list -> Image In-Reply-To: <4E5E60F6.3020902@uci.edu> References: <7E664690-E32D-4D3A-9FAB-E9DD3B6B9A00@quitch.net> <4E5E60F6.3020902@uci.edu> Message-ID: <4E5E82AC.1070905@noaa.gov> On 8/31/11 9:27 AM, Christoph Gohlke wrote: > On 8/31/2011 7:21 AM, Ingo Randolf wrote: >> I have a list with float-values describing an image like this: >> [R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, R, G, B, A, ... etc.] I can't help but wonder why it's in that data structure to begin with -- as you've seen, it's a pretty painfully inefficient way to do it. >> i played around with putdata... you need it in a binary format that is compatible: > Consider using numpy and Image.fromarray. this is probably the best way, but you can also use an array.array object -- create an array.array of type byte from your list, then pass that in to putdata. (details left as an exercise for the reader) I think working with numbers in Python without numpy would be like working with text using lists of characters, rather than the string object. -Chris For > example: > > > import numpy > from PIL import Image > > shape = 256, 256, 4 > px = list(numpy.random.rand(shape[0]*shape[1]*shape[2])) > > newdata = numpy.array(px, dtype=numpy.float32) > newdata *= 255.99998474 > newdata = newdata.astype(numpy.uint8) > newdata.shape = shape > > image = Image.fromarray(newdata) > > > Christoph > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov