From ikeller@linkline.be Sun Mar 2 13:54:42 1997 From: ikeller@linkline.be (Ivan Keller) Date: Sun, 02 Mar 1997 14:54:42 +0100 Subject: [PYTHON IMAGE-SIG] basic IP Message-ID: <1.5.4.32.19970302135442.00665448@linkline.be> Hello! I'm looking for a basic image processing Library for Python. I have to do mathematical processing, so I only need some module to easy manipulate image files. I'm using the pythonwin - Version 1.0 beta 1 for Windows 95. Can you help me ? Excuse me for my horrible english... Thank. Ivan Keller ikeller@linkline.be _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From viennet@ura1507.univ-paris13.fr Sun Mar 2 14:45:11 1997 From: viennet@ura1507.univ-paris13.fr (viennet@ura1507.univ-paris13.fr) Date: Sun, 2 Mar 1997 15:45:11 +0100 Subject: [PYTHON IMAGE-SIG] basic IP In-Reply-To: <1.5.4.32.19970302135442.00665448@linkline.be> References: <1.5.4.32.19970302135442.00665448@linkline.be> Message-ID: <199703021445.PAA14985@sapporo.ibp.fr> Ivan Keller writes: > Hello! > I'm looking for a basic image processing Library for Python. I have to do > mathematical processing, so I only need some module to easy manipulate image > files. I'm using the pythonwin - Version 1.0 beta 1 for Windows 95. Can you > help me ? you should have a look at PIL to read/write/display your images, and use Numerical Python to do your mathematical computation. A beta Win95/NT version of NumPy is available from http://www.sls.lcs.mit.edu/~jjh/numpy > Excuse me for my horrible english... > Thank. Mine is worse... Emmanuel -- Emmanuel Viennet: LIPN - Institut Galilee - Universite Paris-Nord 93430 Villetaneuse - France _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From tismer@tismer.com Sun Mar 2 15:32:21 1997 From: tismer@tismer.com (Christian Tismer) Date: Sun, 02 Mar 1997 16:32:21 +0100 Subject: [PYTHON IMAGE-SIG] basic IP References: <1.5.4.32.19970302135442.00665448@linkline.be> <199703021445.PAA14985@sapporo.ibp.fr> Message-ID: <33199D85.5BF0@tismer.com> viennet@ura1507.univ-paris13.fr wrote: > > Ivan Keller writes: > > Hello! > > I'm looking for a basic image processing Library for Python. I have to do > > mathematical processing, so I only need some module to easy manipulate image > > files. I'm using the pythonwin - Version 1.0 beta 1 for Windows 95. Can you > > help me ? > > you should have a look at PIL to read/write/display your images, and > use Numerical Python to do your mathematical computation. And you should quickly use a newer PythonWin version. BTW, beta 4 contains a stable but slightly out of date version of numpy, after that it is not included. You can keep it and then move on to beta 7 which I highly recommend. > > A beta Win95/NT version of NumPy is available from > http://www.sls.lcs.mit.edu/~jjh/numpy > > > Excuse me for my horrible english... > > Thank. > > Mine is worse... > Emmanuel Not to mention my Kraut speak - chris _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Sun Mar 2 20:10:12 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Sun, 2 Mar 1997 21:10:12 +0100 Subject: [PYTHON IMAGE-SIG] basic IP In-Reply-To: <1.5.4.32.19970302135442.00665448@linkline.be> (message from Ivan Keller on Sun, 02 Mar 1997 14:54:42 +0100) Message-ID: <9703022010.AA11985@arnold.image.ivab.se> > I'm looking for a basic image processing Library for Python. I have > to do mathematical processing, so I only need some module to easy > manipulate image files. I'm using the pythonwin - Version 1.0 beta 1 > for Windows 95. Can you help me ? You probably want to use PIL to read and write the files, and Numerical Python to process them. You should be able to find more information via: http://www.python.org/sigs/matrix-sig http://www.python.org/sigs/image-sig/Imaging.html There's a binary distribution of PIL available via the latter link, which works fine with PythonWin (as long you don't use Tk, that is). Cheers /F _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Manny.Juan@wellsfargo.com Mon Mar 3 19:38:00 1997 From: Manny.Juan@wellsfargo.com (manny juan) Date: Mon, 03 Mar 1997 10:38:00 -0900 Subject: [PYTHON IMAGE-SIG] missing _tkinter.dlll in tkinter8.01a? Message-ID: <331B2898.4F67@wellsfargo.com> i downloaded tk/tkinter 8.01 for windows 95 and tried to install it over my existing python setup (based on tcl7.6 and tk4.2) but python would not work with tkinter. i believe it needs a corresponding tkinter 8.01 version of _tkinter.dll is this the right place to get it? thanks manny juan juanm@wellsfargo.com _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Ralph.Heinkel@embl-heidelberg.de Wed Mar 5 14:44:46 1997 From: Ralph.Heinkel@embl-heidelberg.de (Ralph Heinkel) Date: Wed, 5 Mar 1997 14:44:46 GMT Subject: [PYTHON IMAGE-SIG] Basic PIL problems Message-ID: <199703051444.OAA08495@emu.embl-heidelberg.de> Hello, I just got PIL installed (version 0.2b4), but basically I cannot do very much (or I misunderstood almost everything). First try: Using pilfile.py hobbes:/struct/fuller1/heinkel/src/Python-1.4/Extensions/Imaging$ python pilfile.py Images/lena.gif Image: failed to import ArgImagePlugin : cannot import name ChunkStream Traceback (innermost last): File "pilfile.py", line 60, in ? im = Image.open(file) File "/usr/local/lib/python1.4/Image.py", line 401, in open init() File "/usr/local/lib/python1.4/Image.py", line 74, in init exec "import " + f File "", line 1, in ? File "/usr/local/lib/python1.4/WmfImagePlugin.py", line 274, in ? Image.register_open("WMF", WmfImageFile, _accept) TypeError: too many arguments hobbes:/struct/fuller1/heinkel/src/Python-1.4/Extensions/Imaging Second try: Using pilconvert.py hobbes:/struct/fuller1/heinkel/src/Python-1.4/Extensions/Imaging$ python pilconvert.py Images/lena.gif Images/lena.tif Image: failed to import ArgImagePlugin : cannot import name ChunkStream cannot convert image (TypeError:too many arguments) hobbes:/struct/fuller1/heinkel/src/Python-1.4/Extensions/Imaging$ Third try: Doing things manually in python Why does it work to open the file, when I do it two times in a row? hobbes:/trash/heinkel/python$ python Python 1.4 (Nov 12 1996) [GCC 2.7.2.f.1] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import Image >>> im=Image.open('lena.gif') Image: failed to import ArgImagePlugin : cannot import name ChunkStream Traceback (innermost last): File "", line 1, in ? File "/usr/local/lib/python1.4/Image.py", line 401, in open init() File "/usr/local/lib/python1.4/Image.py", line 74, in init exec "import " + f File "", line 1, in ? File "/usr/local/lib/python1.4/WmfImagePlugin.py", line 274, in ? Image.register_open("WMF", WmfImageFile, _accept) TypeError: too many arguments >>> im=Image.open('lena.gif') >>> In Image.py I found the methods 'tostring' and 'fromstring' which are not documented (at least not in my 0.2B3 docu). Does the format of the returned/accepted string depend on the image format, or is it an independent internal format? What I would like to do is: I have a string 'myimage' received from a selfmade python module which holds a 100x100 grayscale image, with 2 bytes/pixel. How can I feed that into PIL to get a tif/gif/ppm file? Is 'fromstring' the right way to do that? A first try using 'tostring' and 'fromstring' failed: >>> im=Image.open('lena.gif') >>> im.mode 'P' >>> im.format 'GIF' >>> im2=Image.new(im.mode,im.size) # create new file, same mode and size >>> im2.fromstring(im.tostring()) # copy image ... >>> im2.save('lena2.gif') # and save it sh: ppmtogif: command not found >>> Does that imply that 'tostring' returns an image in ppm format? Can't PIL do the reverse thing internally? Questions about questions ... I hope that anybody can help me with that. Thanks, Ralph _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Wed Mar 5 14:57:25 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Wed, 5 Mar 1997 15:57:25 +0100 Subject: [PYTHON IMAGE-SIG] Basic PIL problems In-Reply-To: <199703051444.OAA08495@emu.embl-heidelberg.de> (message from Ralph Heinkel on Wed, 5 Mar 1997 14:44:46 GMT) Message-ID: <9703051457.AA02053@arnold.image.ivab.se> > hobbes:/struct/fuller1/heinkel/src/Python-1.4/Extensions/Imaging$ python pilfile.py Images/lena.gif > Image: failed to import ArgImagePlugin : cannot import name ChunkStream > Traceback (innermost last): Check your installation; it seems to me that you have a mix of 0.2b4 files and older versions (the ppmtogif complaint, for example; 0.2b4 includes its own GIF writer). > In Image.py I found the methods 'tostring' and 'fromstring' which > are not documented (at least not in my 0.2B3 docu). Does the format > of the returned/accepted string depend on the image format, or is it > an independent internal format? They process data in an internal format that depends on the mode, not the original fileformat. Basically, "1", "L", "P" are returned with one byte per pixel, while "RGB", "RGBA" and "CMYK" are returned as 4-byte per pixel (using a filler byte in the "RGB" case). I will probably change this so that you can request other formats. If you have data in an array, you could also try "putdata". It also allows you to provide a scale and offset used to fit your data into the 0..255 range used by PIL. But I think you have to use the source to find out exactly how that one works... Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Ralph.Heinkel@embl-heidelberg.de Thu Mar 6 09:54:07 1997 From: Ralph.Heinkel@embl-heidelberg.de (Ralph Heinkel) Date: Thu, 6 Mar 1997 09:54:07 GMT Subject: [PYTHON IMAGE-SIG] Basic PIL problems In-Reply-To: <9703051457.AA02053@arnold.image.ivab.se> References: <199703051444.OAA08495@emu.embl-heidelberg.de> <9703051457.AA02053@arnold.image.ivab.se> Message-ID: <199703060954.JAA09741@emu.embl-heidelberg.de> Fredrik Lundh writes: > > > hobbes:/struct/fuller1/heinkel/src/Python-1.4/Extensions/Imaging$ python pilfile.py Images/lena.gif > > Image: failed to import ArgImagePlugin : cannot import name ChunkStream > > Traceback (innermost last): > > Check your installation; it seems to me that you have a mix of 0.2b4 > files and older versions (the ppmtogif complaint, for example; 0.2b4 > includes its own GIF writer). Ok, that indeed was a problem. Sorry for that, but when I copied files from Imaging/Lib to my python lib directory, I got some errors which I haven't seen. Now, pilfile.py works fine, pilconvert.py seems to work fine at a first glance, but: hobbes:$ python pilfile.py lena.gif hobbes:$ python pilconvert.py lena.gif lena.tif looks ok, but xv cannot display it (tif directory is missing required "colormap" field) and: hobbes:$ python pilfile.py lena.tif lena.tif failed: cannot identify image file hobbes:$ python pilconvert.py lena.gif lena.ppm cannot convert image (IOError:cannot write mode P as PPM) hobbes:$ Also the 'tostring'/'fromstring' combination still gives error messages: >>> import Image >>> im=Image.open('lena.gif') >>> im.size (128, 128) >>> im2=Image.new(im.mode,im.size) >>> im2.fromstring(im.tostring()) >>> im2.save('lena2.gif') Traceback (innermost last): File "", line 1, in ? File "/usr/local/lib/python1.4/Image.py", line 356, in save SAVE[string.upper(format)](self, fp, filename) File "/usr/local/lib/python1.4/GifImagePlugin.py", line 194, in _save for s in getheader(im): File "/usr/local/lib/python1.4/GifImagePlugin.py", line 254, in getheader s.append(im.im.getpalette("RGB")) ValueError: >>> I double-checked this on a different machine with a python/PIL installation from scratch (just to make sure ...) and it gave me the same results. Ralph _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Thu Mar 6 10:57:48 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Thu, 6 Mar 1997 11:57:48 +0100 Subject: [PYTHON IMAGE-SIG] Basic PIL problems In-Reply-To: <199703060954.JAA09741@emu.embl-heidelberg.de> (message from Ralph Heinkel on Thu, 6 Mar 1997 09:54:07 GMT) Message-ID: <9703061057.AA05712@arnold.image.ivab.se> This is all related to palette issues; PIL 0.2b4 lacks some basic functionality in this domain; something that suddently became critical when I finally added GIF write support to the library. Here's the most serious problems: 1. The colour quantization code is not up and running: RGB=>P conversion doesn't work, that is. P=>RGB works fine, on the other hand. 2. The ImagePalette module is just a stub; Anthony Baxter (I think) submitted a fixed version a while ago; makes it much easier to create and work with palettes. You'll find it in the archive at http://www.python.org/sigs/image-sig 3. The file writing code never converts between modes; this is intentional. However, to make life simpler for utilities like pilconvert, I need to add some "format" capability mechanism, or at least a "force conversion" flag to the save method. Plan to make a serious attempt to fix all this before 0.2final. Cheers /F > hobbes:$ python pilconvert.py lena.gif lena.tif > > looks ok, but xv cannot display it (tif directory is missing required > "colormap" field) and: The Tiff writer simply forgets to write the palette. I've received some patches to the tiff plugin that might address this, but haven't had time to test them yet. > hobbes:$ python pilconvert.py lena.gif lena.ppm > cannot convert image (IOError:cannot write mode P as PPM) See (3). You can make this work by using the -r switch, which forces conversion to "RGB". > Also the 'tostring'/'fromstring' combination still gives > error messages: > > >>> im2=Image.new(im.mode,im.size) > >>> im2.fromstring(im.tostring()) > >>> im2.save('lena2.gif') The problem is that the palette is not copied by that construct, so the resulting image simply doesn't have a valid palette; something that really confuses the GIF writer. See (2) for something that makes it a bit better. We do apologize for the inconvenience ;-) Cheers /F _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From skip@calendar.com (Skip Montanaro) Thu Mar 6 12:23:20 1997 From: skip@calendar.com (Skip Montanaro) (Skip Montanaro) Date: Thu, 6 Mar 1997 07:23:20 -0500 (EST) Subject: [PYTHON IMAGE-SIG] PIL example scripts? Message-ID: <199703061223.HAA29602@dolphin.automatrix.com> -----BEGIN PGP SIGNED MESSAGE----- I want to compare two images by computing something like an RMS value for the difference of the images. Is this easily doable with PIL (and possibly NumPy mixed in)? In general, are there some interesting PIL example scripts laying about? I didn't see much in the PIL distribution and nothing in the contrib section of the Python site. Thanks, - -- Skip Montanaro | Python - it's not just for scripting anymore... skip@calendar.com | http://www.python.org/ (518)372-5583 | Musi-Cal ------> http://concerts.calendar.com/ -----BEGIN PGP SIGNATURE----- Version: 2.6.2 Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQCVAwUBMx63Nh+q0G630cGhAQEVwgQAmRBKid/KJGnhCAtYFQTmHzo83vbbP9jV WnTmQyHWBDIU+ZEmYwb9R/tyd7VQ2w+jLkU7Iuy7YMYBuhxteEkvK1WuSN7ipnwB Ga/kMl1nGWK5OM/8H9PXUcmBKI3OPgXU9ZJ2fS/aqoOs2Rtw6KSF8qJs9JDh5ZGT XWLdUeJXE4o= =S+Rn -----END PGP SIGNATURE----- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Thu Mar 6 12:35:32 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Thu, 6 Mar 1997 13:35:32 +0100 Subject: [PYTHON IMAGE-SIG] PIL example scripts? In-Reply-To: <199703061223.HAA29602@dolphin.automatrix.com> (message from Skip Montanaro on Thu, 6 Mar 1997 07:23:20 -0500 (EST)) Message-ID: <9703061235.AA06151@arnold.image.ivab.se> > I want to compare two images by computing something like an RMS > value for the difference of the images. Is this easily doable with > PIL (and possibly NumPy mixed in)? Lets see... h1 = Image.open("image1").histogram() h2 = Image.open("image2").histogram() rms = math.sqrt(reduce(operator.add, map(lambda a,b: (a-b)**2, h1, h2))/len(h1)) Or something (completely untested). > In general, are there some interesting PIL example scripts laying > about? I didn't see much in the PIL distribution and nothing in the > contrib section of the Python site. Except for the Scripts subdirectory (which IMO contains some pretty interesting stuff), its not much. Will probably put some material that doesn't fit into the book at my homepage, but its not much there yet. Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Sun Mar 2 20:10:12 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Sun, 2 Mar 1997 21:10:12 +0100 Subject: [PYTHON IMAGE-SIG] basic IP In-Reply-To: <1.5.4.32.19970302135442.00665448@linkline.be> (message from Ivan Keller on Sun, 02 Mar 1997 14:54:42 +0100) Message-ID: <9703022010.AA11985@arnold.image.ivab.se> > I'm looking for a basic image processing Library for Python. I have > to do mathematical processing, so I only need some module to easy > manipulate image files. I'm using the pythonwin - Version 1.0 beta 1 > for Windows 95. Can you help me ? You probably want to use PIL to read and write the files, and Numerical Python to process them. You should be able to find more information via: http://www.python.org/sigs/matrix-sig http://www.python.org/sigs/image-sig/Imaging.html There's a binary distribution of PIL available via the latter link, which works fine with PythonWin (as long you don't use Tk, that is). Cheers /F _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fdrake@CNRI.Reston.Va.US Tue Mar 11 15:35:02 1997 From: fdrake@CNRI.Reston.Va.US (Fred L. Drake) Date: Tue, 11 Mar 1997 10:35:02 -0500 (EST) Subject: [PYTHON IMAGE-SIG] Determining which formats are "loadable" Message-ID: <199703111535.KAA10346@weyr.CNRI.Reston.Va.US> I'd like to be able to check to see if an image format is loadable before performing any operations on it, mainly so I can check for alternative formats. If I have a MIME type, I can use Image.MIME dictionary to get the format tag and then use Image.OPEN to determine that a factory exists for the format, but that doesn't tell me that I can actually load the data. Is there a way to determine whether an image format is loadable before I actually retrieve the image data? Thanks! -Fred -- Fred L. Drake, Jr. fdrake@cnri.reston.va.us Corporation for National Research Initiatives 1895 Preston White Drive Reston, VA 20191-5434 _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Tue Mar 11 16:07:59 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Tue, 11 Mar 1997 17:07:59 +0100 Subject: [PYTHON IMAGE-SIG] Determining which formats are "loadable" In-Reply-To: <199703111535.KAA10346@weyr.CNRI.Reston.Va.US> (fdrake@CNRI.Reston.Va.US) Message-ID: <9703111607.AA28058@arnold.image.ivab.se> > I'd like to be able to check to see if an image format is loadable > before performing any operations on it, mainly so I can check for > alternative formats. If I have a MIME type, I can use Image.MIME > dictionary to get the format tag and then use Image.OPEN to determine > that a factory exists for the format, but that doesn't tell me that I > can actually load the data. > Is there a way to determine whether an image format is loadable > before I actually retrieve the image data? Nope. Actually, PIL 0.2b4 can read all formats for which there are factories (MPEG being the only exception, I think); but it cannot read all variants of every format... So as far as you can tell from the MIME type, if there's a factory, PIL might be able to handle the file, and you must download at least a part of it to be able to tell for sure. I have some ideas on how to minimize the amount of data you actually have to download (varies greatly between formats), but they will most likely not make their way into 0.2. But maybe later. Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Corbin.Mitchell@AtlantaGA.ncr.com Tue Mar 11 16:59:48 1997 From: Corbin.Mitchell@AtlantaGA.ncr.com (Mitchell, Corbin) Date: Tue, 11 Mar 1997 11:59:48 -0500 Subject: [PYTHON IMAGE-SIG] e-mail address change Message-ID: You have an address in your mailing which has been changed. jhuang@winhitc.atlantaga.ncr.com is no longer valid please change it to James.Huang@AtlantaGA.ncr.com Corbin Mitchell Network Administrator NCR Human Interface Technology Center Atlanta, GA Phone: 404-810-7098 e-mail: Corbin.Mitchell@AtlantaGA.ncr.com _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Dirk.Engelmann@iwr.uni-heidelberg.de Sat Mar 15 01:17:39 1997 From: Dirk.Engelmann@iwr.uni-heidelberg.de (Dirk Engelmann) Date: Sat, 15 Mar 1997 02:17:39 +0100 (MET) Subject: [PYTHON IMAGE-SIG] tkinter Problem? Message-ID: Hi, I tried to compile python with tkinter suport according to the documentaion of python imaging library, and it didn't work: The problem is: python: can't resolve symbol 'TkImaging_Init' I made the fix in tkappinit.c , but obviously TkImaging_Init() wasn't resolved. Is there something more to do, except modifying python setup and tkappinit.c ? Thanks for help! regards, Dirk Engelmann _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Mon Mar 17 09:46:11 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Mon, 17 Mar 1997 10:46:11 +0100 Subject: [PYTHON IMAGE-SIG] tkinter Problem? In-Reply-To: (message from Dirk Engelmann on Sat, 15 Mar 1997 02:17:39 +0100 (MET)) Message-ID: <9703170946.AA05074@arnold.image.ivab.se> > Is there something more to do, except modifying python setup and > tkappinit.c ? You must compile and link with tkImaging.c as well (its in the Tk subdirectory). Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From T.Ibbs@geog.gla.ac.uk Tue Mar 18 16:19:27 1997 From: T.Ibbs@geog.gla.ac.uk (Tony J Ibbs (Tibs)) Date: Tue, 18 Mar 1997 16:19:27 +0000 Subject: [PYTHON IMAGE-SIG] Damned with a DECstation... Message-ID: <48072C5B1C@mailhost.geog.gla.ac.uk> Fired with enthusiasm by the latest release of Grail, I thought "aha - now is the time to get round to trying PIL at last..." Unfortunately, I have a DECstation 5000 with Ultrix v4.4 (and gcc 2.5.8, but I don't think that's the problem...) The header files supplied by DEC do not appear to define any of the terms needed by the "are we bigendian" check in the configure file for libImaging. This causes the thing to give up with a (very useful!) complaint about failing to cross-compile. Unfortunately, the contents of a configure script seem especially designed to drive me batty trying to understand them, so I haven't been able to produce a fix. I know this is probably a vain plea, but does anyone out there have any useful ideas? As a separate issue, I have the JPEG and PNG libraries, but I do not keep them in /usr/local (a daft Unicisim if ever there was one [I can't *believe* my spell checker didn't have "daft" in it!]). I tried several simple things to see if I could get the thing to find the relevant libraries, but to no avail - is this still one of the things unadressed in the configuration? (I note from the SIG archives that there were some problems with this in the early days?). If worst comes to worst, I guess I'll have to wait for the machine that is meant to replace this one (which will probably be a Sparc, so will bring an entirely different set of incompatibility problems) - but that may be some while yet... (And having looked at the archives I now want to know what happened with the satellite imaging stuff people were talking about - now *that* might be of interest to several people here...) -- Tony J Ibbs (Tibs) tony@lsl.co.uk, T.Ibbs@geog.gla.ac.uk http://www.geog.gla.ac.uk/staff/res/tibbs/ _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From phil@geog.ubc.ca Tue Mar 18 16:49:22 1997 From: phil@geog.ubc.ca (Phil Austin) Date: Tue, 18 Mar 1997 08:49:22 -0800 (PST) Subject: [PYTHON IMAGE-SIG] Damned with a DECstation... In-Reply-To: <48072C5B1C@mailhost.geog.gla.ac.uk> References: <48072C5B1C@mailhost.geog.gla.ac.uk> Message-ID: <199703181649.IAA22106@coot.geog.ubc.ca> >>>>> "Tony" == Tibs writes: Tony> (And having looked at the archives I now want to know what Tony> happened with the satellite imaging stuff people were Tony> talking about - now *that* might be of interest to several Tony> people here...) In case you're referring to an exchange between Fredrik and myself last year, our group is still interested in the features I mentioned in that message (coastline overlays, various map projections, rubberbanding, dumping to netcdf files, etc.). I'll be hiring an engineering co-op student to continue work on this (for a 4 month work term) starting May 1. Phil Phil Austin INTERNET: phil@geog.ubc.ca (604) 822-2175 FAX: (604) 822-6150 http://www.geog.ubc.ca/~phil Associate Professor Atmospheric Sciences Programme Geography #217 University of British Columbia 1984 W Mall Vancouver, BC V6T 1Z2 CANADA _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Wed Mar 19 09:04:22 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Wed, 19 Mar 1997 10:04:22 +0100 Subject: [PYTHON IMAGE-SIG] Damned with a DECstation... In-Reply-To: <48072C5B1C@mailhost.geog.gla.ac.uk> (T.Ibbs@geog.gla.ac.uk) Message-ID: <9703190904.AA13766@arnold.image.ivab.se> > The header files supplied by DEC do not appear to define any of the > terms needed by the "are we bigendian" check in the configure file > for libImaging. This causes the thing to give up with a (very > useful!) complaint about failing to cross-compile. Unfortunately, > the contents of a configure script seem especially designed to drive > me batty trying to understand them, so I haven't been able to > produce a fix. I know this is probably a vain plea, but does anyone > out there have any useful ideas? Argh! Try skipping the automatic configuration and hack the config files yourself (but if you don't have an ANSI compiler for your DECstation, you're out of luck anyway...) > As a separate issue, I have the JPEG and PNG libraries, but I do not > keep them in /usr/local (a daft Unicisim if ever there was one [I > can't *believe* my spell checker didn't have "daft" in it!]). I > tried several simple things to see if I could get the thing to find > the relevant libraries, but to no avail - is this still one of the > things unadressed in the configuration? (I note from the SIG > archives that there were some problems with this in the early > days?). Well, I'm not an autoconf wizard, so I don't really know how to solve that. Have made some vague attempts to add -with-jpeg=dir to 0.2b5, but never got them to work very good (especially if you first use them and then just do ./configure). If there's any autoconf experts out there, please step forward. > (And having looked at the archives I now want to know what happened > with the satellite imaging stuff people were talking about - now > *that* might be of interest to several people here...) I have a simple a simple visualizer framework in my book. However, the earlier discussions included geometrical transformations, some- thing that PIL isn't really capable of as for now. But displaying already transformed data, with map overlays, pixel query tools, etc, is pretty straightforward with PIL and Tk (some useful tools: transform(EXTENT), ImageTk.Bitmap(), the (completely undocumented) ImagePath module). Cheers /F (http://hem1.passagen.se/eff) PS. You know, when I started the book project, I thought I'd be idle at work, just hacking a little C++ and getting out at five, so I could really focus on Python on my spare time. Instead, they've thrown some pretty large Python projects at me at work... haven't had much time working on PIL and related stuff lately, but that'll get better soon. I hope. _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Wed Mar 19 09:04:22 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Wed, 19 Mar 1997 10:04:22 +0100 Subject: [PYTHON IMAGE-SIG] Damned with a DECstation... In-Reply-To: <48072C5B1C@mailhost.geog.gla.ac.uk> (T.Ibbs@geog.gla.ac.uk) Message-ID: <9703190904.AA13766@arnold.image.ivab.se> > The header files supplied by DEC do not appear to define any of the > terms needed by the "are we bigendian" check in the configure file > for libImaging. This causes the thing to give up with a (very > useful!) complaint about failing to cross-compile. Unfortunately, > the contents of a configure script seem especially designed to drive > me batty trying to understand them, so I haven't been able to > produce a fix. I know this is probably a vain plea, but does anyone > out there have any useful ideas? Argh! Try skipping the automatic configuration and hack the config files yourself (but if you don't have an ANSI compiler for your DECstation, you're out of luck anyway...) > As a separate issue, I have the JPEG and PNG libraries, but I do not > keep them in /usr/local (a daft Unicisim if ever there was one [I > can't *believe* my spell checker didn't have "daft" in it!]). I > tried several simple things to see if I could get the thing to find > the relevant libraries, but to no avail - is this still one of the > things unadressed in the configuration? (I note from the SIG > archives that there were some problems with this in the early > days?). Well, I'm not an autoconf wizard, so I don't really know how to solve that. Have made some vague attempts to add -with-jpeg=dir to 0.2b5, but never got them to work very good (especially if you first use them and then just do ./configure). If there's any autoconf experts out there, please step forward. > (And having looked at the archives I now want to know what happened > with the satellite imaging stuff people were talking about - now > *that* might be of interest to several people here...) I have a simple a simple visualizer framework in my book. However, the earlier discussions included geometrical transformations, some- thing that PIL isn't really capable of as for now. But displaying already transformed data, with map overlays, pixel query tools, etc, is pretty straightforward with PIL and Tk (some useful tools: transform(EXTENT), ImageTk.Bitmap(), the (completely undocumented) ImagePath module). Cheers /F (http://hem1.passagen.se/eff) PS. You know, when I started the book project, I thought I'd be idle at work, just hacking a little C++ and getting out at five, so I could really focus on Python on my spare time. Instead, they've thrown some pretty large Python projects at me at work... haven't had much time working on PIL and related stuff lately, but that'll get better soon. I hope. _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Anthony Baxter Wed Mar 19 09:40:30 1997 From: Anthony Baxter (Anthony Baxter) Date: Wed, 19 Mar 1997 20:40:30 +1100 Subject: [PYTHON IMAGE-SIG] Damned with a DECstation... In-Reply-To: Your message of "Wed, 19 Mar 1997 10:04:22 BST." <9703190904.AA13766@arnold.image.ivab.se> Message-ID: <199703190940.UAA23991@nara.off.connect.com.au> >>> Fredrik Lundh wrote > Argh! Try skipping the automatic configuration and hack the config > files yourself (but if you don't have an ANSI compiler for your > DECstation, you're out of luck anyway...) You'll find life much easier if you build gcc on the decstation. Although the Digital compilers are ANSI.... The best place to look when having autoconf problems is config.log - it contains the compiler's output. Anthony _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From T.Ibbs@geog.gla.ac.uk Wed Mar 19 12:50:04 1997 From: T.Ibbs@geog.gla.ac.uk (Tony J Ibbs (Tibs)) Date: Wed, 19 Mar 1997 12:50:04 +0000 Subject: [PYTHON IMAGE-SIG] Damned with a DECstation... In-Reply-To: Message from Fredrik Lundh of Wed, 19 Mar 1997 10:04:22 +0100 <9703190904.AA13766@arnold.image.ivab.se> Message-ID: <5C8AC8780D@mailhost.geog.gla.ac.uk> Fredrik Lundh wrote: > Argh! Try skipping the automatic configuration and hack the config > files yourself (but if you don't have an ANSI compiler for your > DECstation, you're out of luck anyway...) Seems to me the problem isn't that gcc isn't ISO (and thus ANSI), the problem is that the header files provided by DEC don't supply the macros required by the configure script (which certainly didn't *used* to be in the ANSI/ISO definitions, and aren't mentioned in Harbison & Steele). Anyway. Well, part of the problem, if I remember correctly, was that there weren't any configuration files in what I pulled over (if by that you mean things like config.h), so I had no choice but to use the configure script. I'll maybe try to check that again... ...Hah! Mea culpa. Stupid me. You called it ImConfig.h, not config.h, so I didn't see it. Hah. Anyway, I hacked away, and seem to have built OK. Just for the record, and in case anyone else cares, here is what I did... Relevant bits of ImConfig.h (comments removed to save space) ------------------------------------------------------------ #undef const #undef inline #define HAVE_PROTOTYPES 1 #define STDC_HEADERS 1 #undef WORDS_BIGENDIAN #define SIZEOF_CHAR 1 #define SIZEOF_DOUBLE 8 #define SIZEOF_FLOAT 4 #define SIZEOF_INT 4 #define SIZEOF_LONG 4 #define SIZEOF_SHORT 2 ----------------------- Ditto for the Makefile: ----------------------- srcdir= . VPATH= ${srcdir} CC= gcc RANLIB= ranlib AR= ar DEFS= LIBS= -ljpeg -lz -L/tools/net/lib -lm INCLDIR= . JPEGINCLUDE= /tools/net/incs OPT= -g CFLAGS= $(OPT) -I$(INCLDIR) -I$(JPEGINCLUDE) $(DEFS) ----------------------- (carefully not choosing -Wall for once) Then I touched config.status, and made things (stopping only to change all uses of METHODDEF and GLOBAL in Jpeg*.c to have parentheses around their parameter - wasn't there a note about that on the list a while ago?) Anyway, the upshot is that "make check" produces a rather strangely coloured but decipherable image of a female face, so presumably it all worked (hurrah!). And I've now built a Python with stuff in - seems to be OK. > Well, I'm not an autoconf wizard, so I don't really know how to solve > that. Have made some vague attempts to add -with-jpeg=dir to 0.2b5, > but never got them to work very good (especially if you first use them > and then just do ./configure). If there's any autoconf experts out > there, please step forward. Not me - that stuff is *mean*. All the best, Tony _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From whedbee@ddi.digital.net Fri Mar 21 02:14:59 1997 From: whedbee@ddi.digital.net (Ken Whedbee) Date: 20 Mar 1997 21:14:59 -0500 Subject: [PYTHON IMAGE-SIG] Newbie: lena.jpg fails to load Message-ID: <877mj22dp8.fsf@ddi.digital.net> Hi - I'm getting a failure trying to load "lena.jpg" and would like some pointers in resolving this. I can get "lena.gif" to load correctly. However, when I try "lena.jpg" I get: Python 1.4 (Nov 17 1996) [GCC 2.6.3] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import Image >>> im = Image.open('lena.jpg') >>> im.resize((500, 500)) Traceback (innermost last): File "", line 1, in ? File "/local/lib/python1.4/Imaging/Lib/Image.py", line 321, in resize self.load() File "/local/lib/python1.4/Imaging/Lib/ImageFile.py", line 148, in load d = _getdecoder(d, e, a, self.decoderconfig) File "/local/lib/python1.4/Imaging/Lib/ImageFile.py", line 49, in _getdecoder raise IOError, "decoder %s not available" % d IOError: decoder jpeg not available >>> My platform is FreeBSD 2.1.6. In building the Python Imaging library release 0.2b4, I used jpeglib6.0, tcl7.5, tk4.1. I specified jpeg support in the Setup file, and JpegDecode.c and JpegEncode.c compiled into object files in the libImaging subdirectory. Thanks in advance for any insights ! -- Ken Whedbee mailto:whedbee@ddi.digital.net _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From skip@calendar.com (Skip Montanaro) Fri Mar 21 17:58:34 1997 From: skip@calendar.com (Skip Montanaro) (Skip Montanaro) Date: Fri, 21 Mar 1997 12:58:34 -0500 (EST) Subject: [PYTHON IMAGE-SIG] Comparing two images - looking for references... Message-ID: <199703211758.MAA19105@dolphin.automatrix.com> -----BEGIN PGP SIGNED MESSAGE----- I'm fiddling with some images trying to quantify the differences between two similar images. I've been computing RMS errors, but that's just a computational convenience. RMS errors don't necessarily (and I suspect, probably don't) match the differences humans might perceive. Since I'm an image processing novice, I was hoping someone could help me jump-start my search for useful material in this area. References to the research literature, web sites, relevant books, whatever, would all be cheerfully accepted. Thanks, - -- Skip Montanaro | Musi-Cal: http://concerts.calendar.com/ skip@calendar.com | What's your favorite programming language? Mine's (518)372-5583 | Python: http://www.python.org/ -----BEGIN PGP SIGNATURE----- Version: 2.6.2 Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQCVAwUBMzLMSB+q0G630cGhAQG89QQArr3ZDHrQs1rKxlshhSGB1bBqJDe7OjVS wsgPyuVvNMBki4qwsKGVJ84aTQ6M7OSm1vXatCcUnTCZkqLjhT41eyQXptUiVDQF I4HEhVEzo22onXcJpUZsLuxYnPcfAWzJ+yvcxvEHHUYEUbEmcHMqGamZ/7VyD3Bm xEA0LeASdk8= =VWdm -----END PGP SIGNATURE----- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From amk@magnet.com Fri Mar 21 21:13:31 1997 From: amk@magnet.com (Andrew Kuchling) Date: Fri, 21 Mar 1997 16:13:31 -0500 (EST) Subject: [PYTHON IMAGE-SIG] OCR information Message-ID: <199703212113.QAA07072@lemur.magnet.com> I'd like to do some volunteer work for the Gutenberg Project, scanning and OCRing texts. Since I run Linux on an Alpha, OCR software is difficult to acquire, and I'm thinking of writing my own in C and Python. However, there doesn't seem to be an obvious starting reference; texts on image processing cover convolutions, filters, and the like, but not feature analysis or recognition. This SIG seems like the best place to ask: can anyone recommend a good textbook or collection of papers on OCR? And, while I'm at it, has anyone written code to perform 2D Fourier transforms on PIL images? Thanks in advance... Andrew Kuchling amk@magnet.com http://people.magnet.com/%7Eamk/ Save the Gutenberg Project! http://www.promo.net/pg/nl/pgny_nov96.html _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From mclay@nist.gov Fri Mar 21 17:30:49 1997 From: mclay@nist.gov (Michael McLay) Date: Fri, 21 Mar 1997 12:30:49 -0500 Subject: [PYTHON IMAGE-SIG] OCR information In-Reply-To: <199703212113.QAA07072@lemur.magnet.com> References: <199703212113.QAA07072@lemur.magnet.com> Message-ID: <199703211730.MAA04375@fermi.eeel.nist.gov> The NIST library catalog had about 400 hits on "OCR". It looks like there is a group working on quality metrics for OCR here at NIST. The NISTIR's that are referenced below are research reports. Contacting the author of the report is probaby the easiest way to get hold of a copy. The NIST library is open to the public, so if you feel like driving out to Gathersburg you can do a little browsing. Here's a couple references from the library listing. QC100 .U56 NO.5932 1996 Local LC call number: QC100 .U56 no.5932 1996 Title: Design, integration, and evaluation of form-based handprint and OCR systems / Charles L. Wilson ... [et al.]. Publication info: Gaithersburg, MD : National Institute of Standards and Technology, 1996. Series: (NISTIR ; 5932) General note: "December 1996." Also held by: NIST Charles L. Wilson (301) 975-2080 cwilson@nist.gov ######################################################################### QC100 .U56 Local LC call number: QC100 .U56 no.5123 1993 Personal author: Grother, Patrick J. Title: Cross validation comparison of NIST OCR databases / Patrick J. Grother. Publication info: Gaithersburg, Md. : U.S. Dept. of Commerce, National Institute of Standards and Technology ; Springfield, Va. : Order from NTIS, 1993. Series: (NISTIR ; 5123) General note: "January 1993" Also held by: NIST pgrother@nist.gov #########################################################################QC100 .U56 Local LC call number: QC100 .U56 NO.4990 1992 Personal author: Geist, Jon. Title: OCR error rate versus rejection rate for isolatrd handprint characters / Jon Geist, R. Allen Wilkinson. Publication info: Gaithersburg, Md. : U.S. Dept. of Commerce, National Institute of Standards and Technology ; Springfield, Va. : Order from NTIS, 1992. Series: (NISTIR ; 4990) General note: "December 1992" Also held by: NIST Geist, Jon Dr. 301) 975-5484 no email _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From da@maigret.cog.brown.edu Fri Mar 21 22:54:05 1997 From: da@maigret.cog.brown.edu (David Ascher) Date: Fri, 21 Mar 1997 17:54:05 -0500 (EST) Subject: [PYTHON IMAGE-SIG] OCR information In-Reply-To: <199703211730.MAA04375@fermi.eeel.nist.gov> Message-ID: I don't want to discourage such a worthy endeavor, but I think writing a competent OCR package from scratch is hardly worth the effort. If you can steal an established algorithm without too much work (e.g. from NIST), then by all means do it. But doing OCR is hard, and I suspect it would be more cost-effective for you to work for a few hours and buy an OCR package with the proceeds than to write something which comes even close in performance in less than a decade or so. As far as helping the Gutenberg project, I suspect that's a more efficient use of your skills... Now, if what you really want is to *learn* about OCR, by all means, go ahead! --david PS: I believe that most OCR packages use templates of various kinds which are derived from very very large statistical analyses of huge text corpora. Just that step takes a huge amount of computational resources. _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From amk@magnet.com Fri Mar 21 23:44:04 1997 From: amk@magnet.com (Andrew Kuchling) Date: Fri, 21 Mar 1997 18:44:04 -0500 (EST) Subject: [PYTHON IMAGE-SIG] OCR information In-Reply-To: from "David Ascher" at Mar 21, 97 05:54:05 pm Message-ID: <199703212344.SAA14032@lemur.magnet.com> David Ascher wrote: > I don't want to discourage such a worthy endeavor, but I think writing a > competent OCR package from scratch is hardly worth the effort. If you can > steal an established algorithm without too much work (e.g. from NIST), > then by all means do it. Well, this is also for my own amusement and instruction, and I'll try to get a few tutorial articles out of it. I found a copy of the NIST OCR system at ftp://ftp.cygnus.com/pub/, which seems to aim at handwriting (and not typeset character) recognition, but it's fearsome stuff, with code to do dictionary searches, neural networks...eek. Without more understanding of the algorithms involved, using that code is quite unlikely. There's another package, xocr, that does something much simpler. According to INFO.ENGLISH, there are various heuristics to guess where the next letter is, and then, to quote: WSA-algorithm: (Degree-cut-analysis) Every character is zoomed to a fixed size. (here: 16x16 pixel) Parallel lines are layerd over the picture. (here: 16 lines) Now, all Pixels which are set in the picture and placed on a line are counted. (here: 0..24 Points) After that the lines will be turned by a fixed degree-value and again calculated like above. All lines will be turned step by step until 180 degrees are reached. We have 128 values calculated. These values are coresponding with a 128 dimensional space. Now , all trained characters are points in this space. The lowest distance between the character we want to know and all of the trained characters will be calculated. If this distance is very small the character will be accepted as well-recognized, otherwise the user is consulted if it was right detected ! This looks fairly simple, and not out of the reach of PIL and the Numeric extension, but how well does it work in practice? Again, I have no way to tell... So, any suggestions for good pattern recognition books? Andrew Kuchling amk@magnet.com http://people.magnet.com/%7Eamk/ Save the Gutenberg Project! http://www.promo.net/pg/nl/pgny_nov96.html _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From skip@calendar.com (Skip Montanaro) Sat Mar 22 15:42:28 1997 From: skip@calendar.com (Skip Montanaro) (Skip Montanaro) Date: Sat, 22 Mar 1997 10:42:28 -0500 (EST) Subject: [PYTHON IMAGE-SIG] ImageChops bug? Message-ID: <199703221542.KAA00744@dolphin.automatrix.com> -----BEGIN PGP SIGNED MESSAGE----- I tried taking the difference of two GIF images: >>> im1 = Image.open('mapwireworld.gif') >>> im2 = Image.open('mapwireworld.gif.GIF') >>> diff = ImageChops.difference(im1, im2) >>> Image._showxv(diff) Traceback (innermost last): File "", line 1, in ? File "/usr/local/lib/python1.4/Image.py", line 544, in _showxv file = self.convert("RGB")._dump() File "/usr/local/lib/python1.4/Image.py", line 181, in convert im = self.im.convert(mode) ValueError: No palette >>> Why no palette? The two original images are available at: http://dolphin.automatrix.com/~skip/mapwireworld.gif http://dolphin.automatrix.com/~skip/mapwireworld.gif.GIF File says: mapwireworld.gif: GIF picture - version 89a 599 x 455, 256 colors mapwireworld.gif.GIF: GIF picture - version 87a 599 x 455, interlaced, 64 colors If I convert them to RGB images before taking their difference, the difference image displays fine. Seems like a bug in ImageChops.difference or its underlying helper functions. (This is PIL 0.2b5, by the way.) Thx, - -- Skip Montanaro | Musi-Cal: http://concerts.calendar.com/ skip@calendar.com | What's your favorite programming language? Mine's (518)372-5583 | Python: http://www.python.org/ -----BEGIN PGP SIGNATURE----- Version: 2.6.2 Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQCVAwUBMzP94R+q0G630cGhAQEGVAP+NRbUaHYYyUHG5Qa5RsTyIyDKgl6DJclz mUXjHN57yMTEmgtP3w/IDqgl1bK8eHAjcNW/rGvv/AjAaKKyRJCagv30HaYhLzMB 78hnG85jkjHD29Dbyx0XlG+5Dr7t7ZWYQTh2FdOvR7YMUs736avuQTGP5NzpKjyB YlRNo2CuuH4= =O3P3 -----END PGP SIGNATURE----- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Sat Mar 22 15:50:21 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Sat, 22 Mar 1997 16:50:21 +0100 Subject: [PYTHON IMAGE-SIG] ImageChops bug? In-Reply-To: <199703221542.KAA00744@dolphin.automatrix.com> (message from Skip Montanaro on Sat, 22 Mar 1997 10:42:28 -0500 (EST)) Message-ID: <9703221550.AA00516@arnold.image.ivab.se> > If I convert them to RGB images before taking their difference, the > difference image displays fine. Seems like a bug in ImageChops.difference > or its underlying helper functions. Yep, the ImageChops functions drops the palette, something that (later) gives the ValueError exception you got. This is on the list of palette related problems I'm working on for the moment. (on the other hand, I'm not sure what palette to set on the resulting image; maybe the result should be an "L" image instead?). > This is PIL 0.2b5, by the way. 0.2b4, I hope? ;-) Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From whedbee@ddi.digital.net Thu Mar 27 01:43:33 1997 From: whedbee@ddi.digital.net (Ken Whedbee) Date: 26 Mar 1997 20:43:33 -0500 Subject: [PYTHON IMAGE-SIG] Newbie: lena.jpg fails to load In-Reply-To: Ken Whedbee's message of 20 Mar 1997 21:14:59 -0500 References: <877mj22dp8.fsf@ddi.digital.net> Message-ID: <87bu863y9m.fsf@ddi.digital.net> Ken Whedbee writes: > I'm getting a failure trying to load "lena.jpg" and would like some > pointers in resolving this. I can get "lena.gif" to load correctly. > However, when I try "lena.jpg" I get: > > Python 1.4 (Nov 17 1996) [GCC 2.6.3] > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam > >>> import Image > >>> im = Image.open('lena.jpg') > >>> im.resize((500, 500)) > Traceback (innermost last): > File "", line 1, in ? > File "/local/lib/python1.4/Imaging/Lib/Image.py", line 321, in resize > self.load() > File "/local/lib/python1.4/Imaging/Lib/ImageFile.py", line 148, in load > d = _getdecoder(d, e, a, self.decoderconfig) > File "/local/lib/python1.4/Imaging/Lib/ImageFile.py", line 49, in _getdecoder > raise IOError, "decoder %s not available" % d > IOError: decoder jpeg not available > >>> Ok - I'll answer my own question. I found out you have to have -DHAVE_LIBJPEG in the DEFS= line in the Imaging/Makefile and in the Imaging/libImaging/Makefile. Too bad the "Setup" file doesn't handle this automatically for you. -- Ken Whedbee mailto:whedbee@ddi.digital.net _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Thu Mar 27 13:38:38 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Thu, 27 Mar 1997 14:38:38 +0100 Subject: [PYTHON IMAGE-SIG] Newbie: lena.jpg fails to load In-Reply-To: <87bu863y9m.fsf@ddi.digital.net> (message from Ken Whedbee on 26 Mar 1997 20:43:33 -0500) Message-ID: <9703271338.AA19556@arnold.image.ivab.se> > Ok - I'll answer my own question. I found out you have to have > -DHAVE_LIBJPEG in the DEFS= line in the Imaging/Makefile and in the > Imaging/libImaging/Makefile. Too bad the "Setup" file doesn't > handle this automatically for you. (Strange. Cannot recall seeing the original post...) In the next release, I've changed things so that everything on by default (its easier to realize that you have to delete stuff than add stuff, even if it is mentioned in the README...). As for automatic- ally updating the Setup file based on what the configuration figured out, that would mean writing some magic Python setup processor, I suppose. Have to think about that one (contributions are welcome ;-). Cheers /F _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From sb@metis.no Thu Mar 27 15:13:13 1997 From: sb@metis.no (Steinar Bang) Date: 27 Mar 1997 16:13:13 +0100 Subject: [PYTHON IMAGE-SIG] report on problems compiling PIL 0.2b4 on Solaris 2.5.1 Message-ID: Platform: UltraSPARC, Solaris 2.5.1, gcc 2.7.2.1, python 1.4, zlib 1.0.4, jpegsrcv6a LD_LIBRARY_PATH = /usr/dt/lib:/usr/openwin/lib:/opt/IXImd12s/lib:/opt/pub/lib I've been trying to configure, and compile PIL 0.2b4 on the above platform, with zlib, python, and libjpeg installed under /opt/pub/ I've unpacked PIL into /opt/pub/lib/python-1.4/Extensions/Imaging/ (there was no Extensions directory there on beforehand, so I added one. I have absolutely *no* idea what to do to make sure that python I've tried both ./configure and ./configure --prefix In both cases, the configure script reports, that it finds libz.a, but not libjpeg.a, even though they both reside in the same directory. When compiling, it fails to find the include file zlib.h (which resides in the directory /opt/pub/include). I added /opt/pub/include manually, in the generated Makefile. It then compiled. I did a "make check", which made xv pop up with a "fruit sallad" version of "lena". I then changed to the Imaging directory, and did make -f Makefile.pre.in boot This creates a Makefile, so I did an make which crashed out with /opt/pub/lib/python1.4/Extensions/Imaging% make gcc -O -I/opt/pub/include/python1.4 -I/opt/pub/lib/python1.4/config -DHAVE_CONFIG_H -IlibImaging libImaging/libImaging.a -I/usr/local/include /usr/local/lib/libjpeg.a -I/usr/local/include /usr/local/lib/libz.a -c ./_imagingmodule.c gcc: /usr/local/lib/libjpeg.a: No such file or directory gcc: /usr/local/lib/libz.a: No such file or directory *** Error code 1 make: Fatal error: Command failed for target `_imagingmodule.o' /opt/pub/lib/python1.4/Extensions/Imaging% [Note! PIL is not something I need right now, I just tried to compile it, to use it together with Grail-0.3b3. But I figured you might appreciate a build report] - Steinar -- ====================================== Steinar Bang, NCR Norge AS, METIS ED&D, P.O.Box 1094, N-3194 Horten, Norway Email: sb@metis.no, Phone: +47 33 03 57 16, Fax: +47 33 03 57 01 _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From whedbee@ddi.digital.net Sat Mar 29 00:20:42 1997 From: whedbee@ddi.digital.net (Ken Whedbee) Date: 28 Mar 1997 19:20:42 -0500 Subject: [PYTHON IMAGE-SIG] Newbie: lena.jpg fails to load In-Reply-To: Fredrik Lundh's message of Thu, 27 Mar 1997 14:38:38 +0100 References: <9703271338.AA19556@arnold.image.ivab.se> Message-ID: <87ybb7tup1.fsf@ddi.digital.net> Fredrik Lundh writes: > > Ok - I'll answer my own question. I found out you have to have > > -DHAVE_LIBJPEG in the DEFS= line in the Imaging/Makefile and in the > > Imaging/libImaging/Makefile. Too bad the "Setup" file doesn't > > handle this automatically for you. > > (Strange. Cannot recall seeing the original post...) > > In the next release, I've changed things so that everything on by > default (its easier to realize that you have to delete stuff than add > stuff, even if it is mentioned in the README...). [snip] That would solve the problem nicely. Much better than having a newbie (like me) digging through the source to figure out what the appropriate #define's are to turn on support for something like jpeg .. :) BTW, kudos for the Imaging package ! -- Ken Whedbee mailto:whedbee@ddi.digital.net _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From skip@calendar.com (Skip Montanaro) Sun Mar 30 00:51:46 1997 From: skip@calendar.com (Skip Montanaro) (Skip Montanaro) Date: Sat, 29 Mar 1997 19:51:46 -0500 (EST) Subject: [PYTHON IMAGE-SIG] Can PIL handle animated GIFs? Message-ID: <199703300051.TAA27372@dolphin.automatrix.com> -----BEGIN PGP SIGNED MESSAGE----- Can PIL handle animated GIFs in any fashion? I'd like to be able to manipulate individual images in the file. If not, how hard would it be to add? Any pointers appreciated. (I'm willing to attempt it, but am completely unfamiliar with the code.) Thanks, - -- Skip Montanaro | Liposuction for your web site: http://www.webfast.com/ skip@calendar.com | Musi-Cal: http://concerts.calendar.com/ (518)372-5583 | Python: http://www.python.org/ -----BEGIN PGP SIGNATURE----- Version: 2.6.2 Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQCVAwUBMz25Hx+q0G630cGhAQEJFQQAi6zz70h1lAcX3UagFHX0tH6I+PLONN7f q2S64YMII8Hc+ftKmX7zseUmWWEGVlcWBndC7c2FSnmfWjFvSX8Fd/wPn94yVAmF GnTJKFIaA4T9io0TXtiWK1+Ml3KPQZ4rsLyg9+kAU04sTJRMoucLx0htylon/hQ4 vOCUfsPAJ9U= =Plx1 -----END PGP SIGNATURE----- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Sun Mar 30 08:31:16 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Sun, 30 Mar 1997 10:31:16 +0200 Subject: [PYTHON IMAGE-SIG] Can PIL handle animated GIFs? In-Reply-To: <199703300051.TAA27372@dolphin.automatrix.com> (message from Skip Montanaro on Sat, 29 Mar 1997 19:51:46 -0500 (EST)) Message-ID: <9703300831.AA19116@arnold.image.ivab.se> > Can PIL handle animated GIFs in any fashion? I'd like to be able to > manipulate individual images in the file. If not, how hard would it > be to add? Any pointers appreciated. (I'm willing to attempt it, > but am completely unfamiliar with the code.) Check play.py and explode.py in the scripts directory. Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________