From raskovsky at gmail.com Thu Dec 20 15:02:24 2012 From: raskovsky at gmail.com (=?ISO-8859-1?Q?Iv=E1n_Raskovsky?=) Date: Thu, 20 Dec 2012 11:02:24 -0300 Subject: [Image-SIG] Bug with jpeg image Message-ID: Hello everyone! I've just encountered a bug regarding ImageFile.Parser.feed() and loading small chunks of data to it from a particular jpeg image. I've uploaded an issue in http://hg.effbot.org/pil-2009-raclette/issue/30/imagefileparserfeed-breaks-with-some-jpeg but I'm not sure if it was the right place to do it. I've also uplaoded the problematic image to the issue. Any ideas why this is happening to this image or how can I fix it? Regards, Iv?n From aclark at aclark.net Thu Dec 20 19:00:32 2012 From: aclark at aclark.net (Alex Clark) Date: Thu, 20 Dec 2012 13:00:32 -0500 Subject: [Image-SIG] Bug with jpeg image References: Message-ID: On 2012-12-20 14:02:24 +0000, Iv?n Raskovsky said: > Hello everyone! > > I've just encountered a bug regarding ImageFile.Parser.feed() and > loading small chunks of data to it from a particular jpeg image. > > I've uploaded an issue in > http://hg.effbot.org/pil-2009-raclette/issue/30/imagefileparserfeed-breaks-with-some-jpeg > > but I'm not sure if it was the right place to do it. I've also > uplaoded the problematic image to the issue. > > Any ideas why this is happening to this image or how can I fix it? Thanks can you also open an issue here: - https://github.com/python-imaging/Pillow/issues And reference the "upstream" issue? > > Regards, > Iv?n > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? https://www.gittip.com/aclark4life/ From raskovsky at gmail.com Thu Dec 20 19:10:47 2012 From: raskovsky at gmail.com (=?ISO-8859-1?Q?Iv=E1n_Raskovsky?=) Date: Thu, 20 Dec 2012 15:10:47 -0300 Subject: [Image-SIG] Bug with jpeg image In-Reply-To: References: Message-ID: On Thu, Dec 20, 2012 at 3:00 PM, Alex Clark wrote: > Thanks can you also open an issue here: > > - https://github.com/python-imaging/Pillow/issues > > And reference the "upstream" issue? Thanks Alex, Here it is: https://github.com/python-imaging/Pillow/issues/30 Any idea why this happens? Regards, Iv?n From aclark at aclark.net Thu Dec 20 19:38:23 2012 From: aclark at aclark.net (Alex Clark) Date: Thu, 20 Dec 2012 13:38:23 -0500 Subject: [Image-SIG] Bug with jpeg image References: Message-ID: On 2012-12-20 18:10:47 +0000, Iv?n Raskovsky said: > On Thu, Dec 20, 2012 at 3:00 PM, Alex Clark wrote: >> Thanks can you also open an issue here: >> >> - https://github.com/python-imaging/Pillow/issues >> >> And reference the "upstream" issue? > > Thanks Alex, > > Here it is: https://github.com/python-imaging/Pillow/issues/30 > > Any idea why this happens? Thanks! No, but I'm just the release manager. There may be others on this list that can help with imaging code issues. > > Regards, > Iv?n > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? https://www.gittip.com/aclark4life/ From aclark at aclark.net Thu Dec 20 20:00:29 2012 From: aclark at aclark.net (Alex Clark) Date: Thu, 20 Dec 2012 14:00:29 -0500 Subject: [Image-SIG] Pillow: the "unfriendly" fork? Message-ID: Folks, I'm trying to mentally prepare for adding Python 3 support to Pillow before PyCon 2013. To do so, I plan to review the work that has been done here: - https://github.com/fluggo/Pillow Then merge and release. Until this point, we've been attempting to track changes via "upstream" tickets in the hope that one day there'd be a new PIL release and we'd stop Pillow development. However I now suspect that the more likely scenario is that we will have to declare at some point that Pillow is "the unfriendly PIL fork", meaning that we will not continue to track changes in Pillow along with the "upstream" changes in PIL. Does this sound reasonable? I think the "best" time to do this would be with the addition of Python 3 support to Pillow, along with a corresponding significant release number change e.g. "Pillow 2.0.0 (now with Python 3 support)" Of course, we could consider Python 3 support as another change to track upstream with PIL. But quite frankly, I'm tired of the additional maintenance burden, and would now prefer to simply encourage bug fixes and releases without the additional task of being "friendly" to PIL. Thoughts? Alex -- Alex Clark ? https://www.gittip.com/aclark4life/ From rowen at uw.edu Thu Dec 20 20:28:12 2012 From: rowen at uw.edu (Russell E. Owen) Date: Thu, 20 Dec 2012 11:28:12 -0800 Subject: [Image-SIG] Pillow: the "unfriendly" fork? References: Message-ID: In article , Alex Clark wrote: > Folks, > > I'm trying to mentally prepare for adding Python 3 support to Pillow > before PyCon 2013. To do so, I plan to review the work that has been > done here: > > - https://github.com/fluggo/Pillow > > Then merge and release. > > > Until this point, we've been attempting to track changes via "upstream" > tickets in the hope that one day there'd be a new PIL release and we'd > stop Pillow development. However I now suspect that the more likely > scenario is that we will have to declare at some point that Pillow is > "the unfriendly PIL fork", meaning that we will not continue to track > changes in Pillow along with the "upstream" changes in PIL. > > Does this sound reasonable? I think the "best" time to do this would be > with the addition of Python 3 support to Pillow, along with a > corresponding significant release number change e.g. "Pillow 2.0.0 (now > with Python 3 support)" > > > Of course, we could consider Python 3 support as another change to > track upstream with PIL. But quite frankly, I'm tired of the additional > maintenance burden, and would now prefer to simply encourage bug fixes > and releases without the additional task of being "friendly" to PIL. > > Thoughts? I agree. -- Russell From sienkiew at stsci.edu Thu Dec 20 20:50:36 2012 From: sienkiew at stsci.edu (Mark Sienkiewicz) Date: Thu, 20 Dec 2012 14:50:36 -0500 Subject: [Image-SIG] Pillow: the "unfriendly" fork? In-Reply-To: References: Message-ID: <50D36C0C.8000606@stsci.edu> On 12/20/12 14:00, Alex Clark wrote: > > Until this point, we've been attempting to track changes via "upstream" tickets in the hope that one day there'd be a new PIL release and we'd stop Pillow development. However I now suspect that the more likely scenario is that we will have to declare at some point that Pillow is "the unfriendly PIL fork", meaning that we will not continue to track changes in Pillow along with the "upstream" changes in PIL. As far as I know, there is nobody acting in bad faith here; it is just necessary to acknowledge the reality of the situation. Don't feel bad about it -- just do it. I don't consider it an "unfriendly" action. This fork doesn't mean we don't appreciate the work of the original author -- rather, we like it enough to make a fork, if that's what it takes to keep it alive. Mark S. From gora at mimirtech.com Thu Dec 20 20:56:05 2012 From: gora at mimirtech.com (Gora Mohanty) Date: Fri, 21 Dec 2012 01:26:05 +0530 Subject: [Image-SIG] Pillow: the "unfriendly" fork? In-Reply-To: References: Message-ID: On 21 December 2012 00:30, Alex Clark wrote: > Folks, > > I'm trying to mentally prepare for adding Python 3 support to Pillow before > PyCon 2013. To do so, I plan to review the work that has been done here: > > - https://github.com/fluggo/Pillow > > Then merge and release. > > > Until this point, we've been attempting to track changes via "upstream" > tickets in the hope that one day there'd be a new PIL release and we'd stop > Pillow development. However I now suspect that the more likely scenario is > that we will have to declare at some point that Pillow is "the unfriendly > PIL fork", meaning that we will not continue to track changes in Pillow > along with the "upstream" changes in PIL. > > Does this sound reasonable? I think the "best" time to do this would be with > the addition of Python 3 support to Pillow, along with a corresponding > significant release number change e.g. "Pillow 2.0.0 (now with Python 3 > support)" [...] I hesitate to comment, not having contributed to PIL in any way other than having been a happy user, and still using it from time to time. I also absolutely do *not* mean to point any fingers, as I understand how difficult it can be to support a widely-used FOSS project, and I do appreciate the key role that PIL has played, and am grateful for the time that people have spent on it on a voluntary basis. Nevertheless, here are some points: 1. We had a client willing to pay to add support for certain TIFF images that were not then supported by PIL. There was one response from an independent developer to a post on the list offering to pay for someone to add such support. Being able to add such support directly to PIL would have been a big plus, but for various reasons we decided to switch to Imagemagick. 2. Imagemagick seems to have a larger community, more recipes on the Internet, and a larger feature set (please correct me if I am wrong). 3. The Python support for Imagemagick is still pretty bad, but at least for us the pros outweigh the cons. So much so, that we are currently willing to use it via subprocess calls to convert/montage/etc. So, a revamped PIL, in whatever form, would be great. If you are driving the effort, I would say go ahead, by all means. However, what I would seriously consider getting involved in is a project for real Python support for Imagemagick. Regards, Gora From gwidion at mpc.com.br Thu Dec 20 22:26:05 2012 From: gwidion at mpc.com.br (Joao S. O. Bueno) Date: Thu, 20 Dec 2012 19:26:05 -0200 Subject: [Image-SIG] Pillow: the "unfriendly" fork? In-Reply-To: <50D36C0C.8000606@stsci.edu> References: <50D36C0C.8000606@stsci.edu> Message-ID: On 20 December 2012 17:50, Mark Sienkiewicz wrote: > > On 12/20/12 14:00, Alex Clark wrote: >> >> >> Until this point, we've been attempting to track changes via "upstream" tickets in the hope that one day there'd be a new PIL release and we'd stop Pillow development. However I now suspect that the more likely scenario is that we will have to declare at some point that Pillow is "the unfriendly PIL fork", meaning that we will not continue to track changes in Pillow along with the "upstream" changes in PIL. > > > > As far as I know, there is nobody acting in bad faith here; it is just necessary to acknowledge the reality of the situation. Don't feel bad about it -- just do it. > > I don't consider it an "unfriendly" action. This fork doesn't mean we don't appreciate the work of the original author -- rather, we like it enough to make a fork, if that's what it takes to keep it alive. > > > Mark S. +1 it is definitively time for Python to have a working, obvious, easy to install, way to deal with images, and trying to tell people "install PIL, but if that does not work, do install Pillow" is not that great when you are trying to talk soemone into use Python due to the easy of getting things done. +1 for partting from the legacy code that has not been updated, so that we can have new code with less burden. js -><- From schou at barracuda.com Thu Dec 6 03:00:02 2012 From: schou at barracuda.com (Samuel Chou) Date: Thu, 06 Dec 2012 02:00:02 -0000 Subject: [Image-SIG] Compilation and Install works but selftest.py fails (reportlab calls also fail) Message-ID: <65C6A498BB5BF245BD7195255041FA2E0C557D4F57@bn-scl-be03.Cudanet.local> Please see gist for details. I'm flummoxed =( git://gist.github.com/4221127.git Sam 'Like' us on Facebook for exclusive content and other resources on all Barracuda Networks solutions. Visit http://barracudanetworks.com/facebook -------------- next part -------------- An HTML attachment was scrubbed... URL: From brandon.j.george at gmail.com Fri Dec 7 19:46:03 2012 From: brandon.j.george at gmail.com (Brandon George) Date: Fri, 7 Dec 2012 10:46:03 -0800 Subject: [Image-SIG] PIL Bug while converting EPS files to PNG Message-ID: I wrote a simple implementation of PIL to convert a list of EPS files to PNG. The output PNG files are at a much lower resolution than required. And there seems to be no way to fix it. Looking at /usr/lib64/python2.7/site-packages/PIL/EpsImagePlugin.py this is implemented by calling ghostscript: # Build ghostscript command command = ["gs", "-q", # quite mode "-g%dx%d" % size, # set output geometry (pixels) "-dNOPAUSE -dSAFER", # don't pause between pages, safe mode "-sDEVICE=ppmraw", # ppm driver "-sOutputFile=%s" % file,# output file "- >/dev/null 2>/dev/null"] the size option only changes the output figure size but does not rescale it, I can make the output image larger, but not higher resolution because the EPS file is being imported at a low resolution. Any help would be appreciated. Thanks Brandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob.Weil at kimball.com Tue Dec 18 21:04:26 2012 From: Bob.Weil at kimball.com (Bob Weil) Date: Tue, 18 Dec 2012 15:04:26 -0500 Subject: [Image-SIG] Can't install PIL 1.1.7 on Windows 7 Message-ID: <1F76F12B19BD8D468D99D917FBC0ABE701C698771D@nts533.kii.kimball.com> Hi, I tried installing the package "Python Imaging Library 1.1.7 for Python 2.7 (Windows only)" on my Windows 7 laptop. It complained that it could not find my Python 2.7 installation in my registry. But, when I type "python" in a command window, I get the following response: Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> What could be the trouble here? I did not have any luck with the source distribution either, getting the following response: running install running build running build_py running build_ext building '_imaging' extension error: \Common was unexpected at this time. I think this might be due to missing build utilities in my Python installation, but I'm not sure what to do about that. Any ideas? Thanks and best regards, Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From edward at unicornschool.org Sat Dec 22 01:02:56 2012 From: edward at unicornschool.org (Edward Cannon) Date: Fri, 21 Dec 2012 16:02:56 -0800 Subject: [Image-SIG] NameError: name 'RGB' is not defined In-Reply-To: References: Message-ID: you need to quote the RGB, Image.new("RGB", (600, 600), (250, 250, 400)) On Tue, Nov 6, 2012 at 11:59 AM, Abha Agrawal wrote: > When I run the follwing code: > > from PIL import Image > Image.new(RGB, (600, 600), (250, 250, 400)) > > it returns > NameError: name 'RGB' is not defined > > Please advise. > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > From edward at unicornschool.org Sat Dec 22 01:11:41 2012 From: edward at unicornschool.org (Edward Cannon) Date: Fri, 21 Dec 2012 16:11:41 -0800 Subject: [Image-SIG] using PIL's split command with color jpg file .. help for color jpg file In-Reply-To: <714690.1352916183811.JavaMail.root@mswamui-valley.atl.sa.earthlink.net> References: <714690.1352916183811.JavaMail.root@mswamui-valley.atl.sa.earthlink.net> Message-ID: r,g,b = im.split() as far as I recall, then each of r,g,b is a grayscale image that is the data that was in the channel. On Wed, Nov 14, 2012 at 10:03 AM, wrote: > I'm using python 2.7 with PIL 1.1.7. > > I figure out how to work with black and white .jpg files. > > I ended up writing a bunch of programs to do some very interesting/cool image process effects as to learn more about image process. > I own a small number of books on the topic of image process and have done some imagine programming in PASCAL and C > in the past too. > > I'm using PIL software to read in the .jpg files & simple functions and then writing my own image processing functions/programs > as learning process for developing my skills for work. I have used some of PIL's image process routines provided as well. > > I'm now wanting to be able to do the same thing with color jpg files. > > But I'm running into problems using the split function. The program quits on the command line > having to do with split function and the error is about no bands defined. > > Can some body please provided a simple working program that show uses the split function > as to access the 3 colors of a .jpg file. I have looked at the PIL hand book but the information > appears to be incomplete at this time for using split function. > > I get much mileage out of studying a good sample but simple program that shows the interaction of the functions > required to do a given task and/or process. > > I notice the PIL web site appears to provide NO sample programs to study and play with at this time. > > I'll be game to provide some of the programs that I came up working with BW .jpg files. > > Thanks > > Jason > > > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig From edward at unicornschool.org Sat Dec 22 01:22:18 2012 From: edward at unicornschool.org (Edward Cannon) Date: Fri, 21 Dec 2012 16:22:18 -0800 Subject: [Image-SIG] Current libraries for image processing? In-Reply-To: References: Message-ID: It depends what you want to do. PIL works very well for what it does. If you want to do heavy math, something in scipy or numpy might be more to your taste. if you need support for basic image formats, and need to do a few operations with them (crop, rotate, adjust, add caption etc) PIL works great. It works wonderfully on python2 across many platforms. there are even python3 ports out there. On Sun, Nov 25, 2012 at 12:58 PM, Alasdair McAndrew wrote: > I'm just starting to investigate Python for image processing, and I'm very > impressed (up to now my main software has been Matlab and its alternatives: > scilab, Octave etc). > > What I want to know is, what is the current state of the art with regard to > image processing libraries? Is PIL still an active concern? Or should I > concentrate on scikits-image, scipy/ndimage, mahotas...? > > Thanks very much, > Alasdair > > -- > Blog: http://amca01.wordpress.com > Web: http://sites.google.com/site/amca01/ > Facebook: http://www.facebook.com/alasdair.mcandrew > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > From jcupitt at gmail.com Sat Dec 22 11:05:38 2012 From: jcupitt at gmail.com (jcupitt at gmail.com) Date: Sat, 22 Dec 2012 10:05:38 +0000 Subject: [Image-SIG] Current libraries for image processing? In-Reply-To: References: Message-ID: Other libraries have Python bindings, for example my library, vips: http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use vips aims to be fast and to be able to handle large images, so it may not fit your needs very well. In scope it's somewhere between PIL and NumPy. The Ruby binding is currently well-maintained and the Python binding a little unloved. The next version should have a new binding system which will bring them all up to par, hopefully. On 25 November 2012 20:58, Alasdair McAndrew wrote: > I'm just starting to investigate Python for image processing, and I'm very > impressed (up to now my main software has been Matlab and its alternatives: > scilab, Octave etc). > > What I want to know is, what is the current state of the art with regard to > image processing libraries? Is PIL still an active concern? Or should I > concentrate on scikits-image, scipy/ndimage, mahotas...? > > Thanks very much, > Alasdair > > -- > Blog: http://amca01.wordpress.com > Web: http://sites.google.com/site/amca01/ > Facebook: http://www.facebook.com/alasdair.mcandrew > > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig > From aclark at aclark.net Sat Dec 22 19:17:30 2012 From: aclark at aclark.net (Alex Clark) Date: Sat, 22 Dec 2012 13:17:30 -0500 Subject: [Image-SIG] problem installing pillow on windows7 References: Message-ID: On 2012-11-02 17:36:22 +0000, John Hinely said: > My long term goal is to run mezzanine using virtualenv on a windows7 > box. ?I'm able to get mezzanine up an running but I receive a "decoder > jpeg not available" error when I try to add images. ?It appears that > libjpeg did not get installed. I used "pip install mezzanine" which > installed pillow as a dependancy. ?Do I need to manually install > libjpeg first? ?How would I go about doing that on windows7? ?Any > assistance would be very much appreciated. OOPS sorry I missed this. Yes, you need to install libjpeg first then install Pillow. If Pillow is already installed, remove it, install libjpeg, and reinstall. > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? https://www.gittip.com/aclark4life/ From aclark at aclark.net Sat Dec 22 19:21:05 2012 From: aclark at aclark.net (Alex Clark) Date: Sat, 22 Dec 2012 13:21:05 -0500 Subject: [Image-SIG] Can't install PIL 1.1.7 on Windows 7 References: <1F76F12B19BD8D468D99D917FBC0ABE701C698771D@nts533.kii.kimball.com> Message-ID: On 2012-12-18 20:04:26 +0000, Bob Weil said: > Hi, > ? > I tried installing the package ?Python Imaging Library 1.1.7 for Python > 2.7 (Windows only)? on my Windows 7 laptop. > ? > It complained that it could not find my Python 2.7 installation in my > registry.? But, when I type ?python? in a command window, I get the > following response: >>>>> ? >>>>> Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit >>>>> (AMD64)] on win32 >>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>> >>> > ? > What could be the trouble here? > ? > I did not have any luck with the source distribution either, getting > the following response: > ? >>>>> running install >>>>> running build >>>>> running build_py >>>>> running build_ext >>>>> building '_imaging' extension >>>>> error: \Common was unexpected at this time. > ? > I think this might be due to missing build utilities in my Python > installation, but I?m not sure what to do about that. > ? > Any ideas? Try Pillow, open a ticket if it doesn't work: https://github.com/python-imaging/Pillow/issues > ? > Thanks and best regards, > Bob > _______________________________________________ > Image-SIG maillist - Image-SIG at python.org > http://mail.python.org/mailman/listinfo/image-sig -- Alex Clark ? https://www.gittip.com/aclark4life/ From karstenwo at googlemail.com Sat Dec 22 17:57:14 2012 From: karstenwo at googlemail.com (Karsten Wolf) Date: Sat, 22 Dec 2012 16:57:14 -0000 Subject: [Image-SIG] PIL Bug while converting EPS files to PNG In-Reply-To: References: Message-ID: <8427181F-CE0F-42A4-A629-0F378FEFCA55@googlemail.com> Hi brandon, the main flaw in eps-pil is it interchanges points and pixels, which are very different quantities. PIL extracts the values from boundingBox (point) and uses them as pixel sizes to open the eps file. That's why pil converted eps files are at 72 dpi. -karsten From JMarsh at marshintprop.com Mon Dec 24 21:35:28 2012 From: JMarsh at marshintprop.com (Marshintprop) Date: Mon, 24 Dec 2012 20:35:28 -0000 Subject: [Image-SIG] Unable to load dynamic image into browser Message-ID: <003101cde215$d76cba30$86462e90$@marshintprop.com> I do not seem to have success in generating a dynamic image into Internet Explorer through CGI. If I save the file and then load it, it works but when I try to keep the generated image dynamic. I am using Python 2.6.5 and the corresponding PIL library. f = cStringIO.StringIO() img.save(f, "PNG") print "Content-type: image/png\n" f.seek(0) print f.read() The above will just generate a screen filled with ascii characters and symbols. I have also tried JPEG to no avail. Below generates a blank image: sys.stdout.write('Status: 200 OK\r\n') sys.stdout.write('Content-type: image/png\r\n\n') sys.stdout.write('%s' % f.getvalue()) sys.stdout.write('\r\n') Can someone point out my error here? Writing to file in a cgi environment is not a great thing to be doing. Img.sav('test.png') is valid. -------------- next part -------------- An HTML attachment was scrubbed... URL: