From anders.blomdell at control.lth.se Wed Sep 12 19:06:14 2012 From: anders.blomdell at control.lth.se (Anders Blomdell) Date: Wed, 12 Sep 2012 19:06:14 +0200 Subject: [Image-SIG] sane.py return incorrect value for options with same name as scanDev attribute Message-ID: <5050C106.5000502@control.lth.se> sane.py return incorrect value for options with same name as scanDev attribute (found while trying to get the value for the 'scan' button on a Canon Lide 110 scanner). A simple patch is provided, but IMHO the sane.py module could do with some cleaning up (how about making it more object oriented...)? --- sane.py 2012-09-12 18:44:41.279360763 +0200 +++ Imaging-1.1.7/Sane/sane.py 2009-11-01 01:44:12.000000000 +0100 @@ -70,7 +70,7 @@ settable = 'no' if self.is_active(): active = 'yes' - curValue = repr(self.scanDev.__getattr__(self.py_name)) + curValue = repr(getattr(self.scanDev, self.py_name)) else: active = 'no' curValue = '' -- Anders Blomdell Email: anders.blomdell at control.lth.se Department of Automatic Control Lund University Phone: +46 46 222 4625 P.O. Box 118 Fax: +46 46 138118 SE-221 00 Lund, Sweden From anders.blomdell at control.lth.se Thu Sep 13 13:19:09 2012 From: anders.blomdell at control.lth.se (Anders Blomdell) Date: Thu, 13 Sep 2012 13:19:09 +0200 Subject: [Image-SIG] sane.py return incorrect value for options with same name as scanDev attribute In-Reply-To: <5050C106.5000502@control.lth.se> References: <5050C106.5000502@control.lth.se> Message-ID: <5051C12D.8070300@control.lth.se> On 2012-09-12 19:06, Anders Blomdell wrote: > sane.py return incorrect value for options with same name as scanDev > attribute (found while trying to get the value for the 'scan' button on > a Canon Lide 110 scanner). > > A simple patch is provided, but IMHO the sane.py module could do with > some cleaning up (how about making it more object oriented...)? > > > --- sane.py 2012-09-12 18:44:41.279360763 +0200 > +++ Imaging-1.1.7/Sane/sane.py 2009-11-01 01:44:12.000000000 +0100 > @@ -70,7 +70,7 @@ > settable = 'no' > if self.is_active(): > active = 'yes' > - curValue = repr(self.scanDev.__getattr__(self.py_name)) > + curValue = repr(getattr(self.scanDev, self.py_name)) > else: > active = 'no' > curValue = '' Attached is a non-reversed diff, fixing some more calls, and making 'open' and 'get_devices' automatically calling '_sane.init'. -- Anders Blomdell Email: anders.blomdell at control.lth.se Department of Automatic Control Lund University Phone: +46 46 222 4625 P.O. Box 118 Fax: +46 46 138118 SE-221 00 Lund, Sweden -------------- next part -------------- A non-text attachment was scrubbed... Name: sane.diff Type: text/x-patch Size: 2278 bytes Desc: not available URL: From skvortsov42 at gmail.com Sun Sep 30 21:28:50 2012 From: skvortsov42 at gmail.com (Chris) Date: Sun, 30 Sep 2012 12:28:50 -0700 Subject: [Image-SIG] (no subject) Message-ID: ImageView.py has a bug on Unix where if the user has both display and xv installed, a call to image.show() results in the image being shown first with display and then with xv. This is because the show function in the file expects the show method to return 1 if successful, but it doesn't return anything. This patch fixes that. -------------- next part -------------- A non-text attachment was scrubbed... Name: ImageShow.py.diff Type: application/octet-stream Size: 104 bytes Desc: not available URL: From hannes.noetzli at kzu.ch Sun Sep 9 12:28:49 2012 From: hannes.noetzli at kzu.ch (=?iso-8859-1?Q?Hannes_N=F6tzli?=) Date: Sun, 09 Sep 2012 10:28:49 -0000 Subject: [Image-SIG] PNG patch for reading zTXt chunks Message-ID: <12BF6567-ACEC-46F2-ABC7-CE72E0B6F985@kzu.ch> Hi I have found your article PNG patch for reading zTXt chunks I have a zTXtComment that I cannot read. Perhaps you can help me (It might be french): 7A 54 58 74 43 6F 6D 6D 65 6E 74 00 00 78 DA AB 53 30 B3 34 33 B5 30 B6 B0 B4 30 B6 30 31 B3 34 37 34 33 35 B7 30 B7 54 A8 03 00 4F E9 05 EB BB 83 12 84 Thanks a lot in advance and greetings from Switzerland Hannes -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanjivchristopher at gmail.com Wed Sep 5 03:48:45 2012 From: sanjivchristopher at gmail.com (Sanjiv Jhangiani) Date: Wed, 05 Sep 2012 01:48:45 -0000 Subject: [Image-SIG] ImportError at /admin/photo_manager/invisibleindividual/1/ The _imaging C module is not installed Message-ID: I realize that there is info out there on this (e.g., in StackOverflow), but one person says place it in the dll file, another something else ... I am using Python 2.7 in Windows Vista - do I need to add/remove something to get this module loaded? - Sanjiv -------------- next part -------------- An HTML attachment was scrubbed... URL: From marquett at iap.fr Mon Sep 17 17:27:38 2012 From: marquett at iap.fr (Jean-Baptiste Marquette) Date: Mon, 17 Sep 2012 15:27:38 -0000 Subject: [Image-SIG] Paste error in subplots using PIL and matplotlib.pylab on MacOS X Message-ID: <4AEADB6D-CE41-4549-9020-71126B9364B1@iap.fr> Dear PIL gurus, I try to paste the same series of images (the Solar System planets) on two subplots of the same figure. The following loop is within a loop on the two subplots : print 'Processing Solar System' for FileImage in ListImages: Planet = os.path.basename(FileImage)[:-9] print 'Processing planet', Planet PlanetData = SolarSystem.where(SolarSystem.Planet == Planet) PlanetImage = Image.open(FileImage) if PlanetData.Radius[0] < 2.0: ZoomPlanet = ShrinkTellur * PlanetData.Radius[0] / Earth.Radius[0] * EarthImage.size[1] / PlanetImage.size[1] else : ZoomPlanet = ShrinkGiant * PlanetData.Radius[0] / Jupiter.Radius[0] * JupiterImage.size[1] / PlanetImage.size[1] PlanetResized = PlanetImage.resize((int(PlanetImage.size[0] * ZoomPlanet), int(PlanetImage.size[1] * ZoomPlanet))) Alpha = PlanetResized.split()[3] Alpha = ImageEnhance.Brightness(Alpha).enhance(Opacity) PlanetResized.putalpha(Alpha) if SubPlot == 1: Factor = 1.0 else: Factor = SnowFactor PlanetX, PlanetY = XPixMin + (np.log10(PlanetData.Distance[0] / Factor) - XScalMin) * XFactor, YPixMax - (np.log10(PlanetData.Mass[0]) - YScalMin) * YFactor XSize, YSize = PlanetResized.size PlanetPos = (int(PlanetX - XSize / 2.0), int(PlanetY - YSize / 2.0)) PlotImage.paste(PlanetResized, PlanetPos, PlanetResized) PlotImage.show() The show() method proves that everything is fine unless the second subplot is processed: the images on the first one are erased. The images below are obtained by commenting the canvas.draw() instruction, thus anything has been removed but the pasted images. The first one is the first subplot well processed, second subplot still blank, the second is the next subplot, first planet. It is clear that all images have been erased from the previous subplot. I use the latest PIL version with Agg backend and : Enthought Python Distribution -- www.enthought.com Version: 7.3-1 (64-bit) Python 2.7.3 |EPD 7.3-1 (64-bit)| (default, Apr 12 2012, 11:14:05) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Any hint welcome, Cheers Jean-Baptiste -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2012-09-17 16.31.03.png Type: image/png Size: 27660 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2012-09-17 16.31.33.png Type: image/png Size: 19787 bytes Desc: not available URL: From felix.sipma at no-log.org Thu Sep 20 11:27:28 2012 From: felix.sipma at no-log.org (=?utf-8?B?RsOpbGl4?= Sipma) Date: Thu, 20 Sep 2012 09:27:28 -0000 Subject: [Image-SIG] bug report: PIL install does not find libjpeg... Message-ID: <20120920091827.GA4001@capeo> Hi! "pip install PIL" fails in finding libjpeg, zlib, ... resulting in multiple "*** LIBNAME support not available". The reason is that PIL setup.py does not look for libs into /usr/lib/x86_64-linux-gnu, where libjpeg, zlib and other are located. The provided patch solves the issue. I am using debian sid x86_64, but I am sure this bug affects other people. Regards, -- F?lix -------------- next part -------------- A non-text attachment was scrubbed... Name: find-libs.patch Type: text/x-diff Size: 144 bytes Desc: not available URL: From reid.t.westwood at intel.com Mon Sep 24 20:03:26 2012 From: reid.t.westwood at intel.com (Westwood, Reid T) Date: Mon, 24 Sep 2012 18:03:26 -0000 Subject: [Image-SIG] PIL Installation Issue: 2.6 Message-ID: <724C18376B29C549A948B7745110F02FDA7C2E@FMSMSX106.amr.corp.intel.com> Hi, I am having trouble installing PIL 1.1.7 for Python 2.6 for Windows 7. I get the error message: "Installation requires Python 2.6, which was not found in the registry" I used the script found here, and added some print statements. The script runs with the following values: version = 2.6 installpath = C:\Python26 regpath = SOFTWARE\Python\Pythoncore\2.6\ pythonpath = C:\Python26;C:\Python26\Lib\;C:\Python26\DLLs\ QueryValue(reg, installkey) = C:\Python26\ QueryValue(reg, pythonkey) = C:\Python26\Lib;C:\Python26\DLLs;C:\Python26\Lib\lib-tk After running the script, it prints: *** Unable to register! *** You probably have another Python installation! Therefore, the register key is opening successfully. The QueryValue results seem to be very close to the expected values (installpath and pythonpath). Any suggestions why the PIL installer is not seeing the Python interpreter, despite it being located where it would be expected, and the key being found in the registry? I would appreciate any suggestions. Thanks, Reid -------------- next part -------------- An HTML attachment was scrubbed... URL: From lipengwan86 at gmail.com Wed Sep 26 19:51:09 2012 From: lipengwan86 at gmail.com (Lipeng Wan) Date: Wed, 26 Sep 2012 17:51:09 -0000 Subject: [Image-SIG] IOError: encoder error -2 when writing image file Message-ID: Hi guys, When I try to save the image, I always get this error: img.save(jpeg,'JPEG') File "D:\Program Files\Python27\lib\site-packages\PIL\Image.py", line 1439, in save save_handler(self, fp, filename) File "D:\Program Files\Python27\lib\site-packages\PIL\JpegImagePlugin.py", line 471, in _save ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)]) File "D:\Program Files\Python27\lib\site-packages\PIL\ImageFile.py", line 501, in _save raise IOError("encoder error %d when writing image file" % s) IOError: encoder error -2 when writing image file Is there anyone who can help me solve this problem? Thanks. Lipeng -------------- next part -------------- An HTML attachment was scrubbed... URL: From Robert.J at saint-gobain.com Wed Sep 26 07:13:33 2012 From: Robert.J at saint-gobain.com (Robert, J [ SGGI - IT ]) Date: Wed, 26 Sep 2012 05:13:33 -0000 Subject: [Image-SIG] Reg:Image Transfer Message-ID: <00946F8B780BAB43A04111EEAA7B47F603B4B2DF@L00EXCEC1.zl.if.atcsg.net> Dear friends, I am using Python 2.7.3. I like to transfer a image file via python to RabbitMQ so I configured image lib in my system. I am using the below program for the image transfer channel.exchange_declare(exchange='testing_room1',type='direct',durable= True,) channel.queue_declare(queue='Testing', durable=True) data="D:\\P.jpg" file=jpeg.compress(data, w, h, b) message =file channel.basic_publish(exchange='testing_room1',routing_key='testing', body=message) But I am getting the error while running the program. Requesting your guidance. Thanks and Regards Robert tona felix.J -------------- next part -------------- An HTML attachment was scrubbed... URL: