From pyinsan@hotmail.com Sat Sep 1 16:13:37 2001 From: pyinsan@hotmail.com (phoon yinsan) Date: Sat, 01 Sep 2001 15:13:37 Subject: [Image-SIG] (no subject) Message-ID: I tried to install the PIL into my python1.5 extension on my linux. I followed the instructions in the README file. So, after I did all make makefile and make, i tried to import _imaging in the python interpreter as told in the README file. But, I've got any error importing it. I'm not sure what went wrong during the installation. Can someone please help me. I need PIL for my project? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp From fredrik@pythonware.com Sun Sep 2 13:07:16 2001 From: fredrik@pythonware.com (Fredrik Lundh) Date: Sun, 2 Sep 2001 14:07:16 +0200 Subject: [Image-SIG] build problems under 1.5 References: Message-ID: <002801c133a7$d1070de0$42fb42d5@hagrid> From: "phoon yinsan" wrote: (please include a valid subject line when posting to a public mailing list) > I tried to install the PIL into my python1.5 extension on my linux. is that Python 1.5, or 1.5.2? (recent versions of PIL hasn't been tested with Python versions before 1.5.2. if you're still using 1.5, consider upgrading to 2.1.1) > I followed the instructions in the README file. So, after I did all make > makefile and make, i tried to import _imaging in the python interpreter as > told in the README file. But, I've got any error importing it. how about telling us *what* error you got? From marc@bowery.com Sun Sep 2 16:28:11 2001 From: marc@bowery.com (marc lindahl) Date: Sun, 02 Sep 2001 11:28:11 -0400 Subject: [Image-SIG] aliasing on resize or thumnail? Message-ID: Hi, A few of us are comparing PIL versus ImageMagick for a web application of creating thumnails for image archives... We're getting aliasing from PIL while doing this... and it seems that the filter parameters in resize() don't do anything. Anyone have a clue? Here is a web page comparing the two: http://www.bickersfamily.org/Photos/PILvsIM/ From jal@cinesite.co.uk Mon Sep 3 18:25:51 2001 From: jal@cinesite.co.uk (John Lockwood) Date: Mon, 03 Sep 2001 18:25:51 +0100 Subject: [Image-SIG] 16 bit support Message-ID: <3B93BD1E.85254825@cinesite.co.uk> Hi Tom, I'm very interested is this. The 16bit to float idea is a good one. Hello Tom, At 09:06 PM 8/30/2001 +1000, you wrote: >Hi > >Early days playing with PIL, I have added PGM support to load and save 16 >bit images, is anyone interested in the patch (its only a few lines)? Yes, I'm interested! Adding this capability would be a nice improvement to PIL. This brings up a few questions. - Can 16-bit TIF files be also loaded? - How do you display the image? I.e. do you display only the top 8-bits or do you keep all of it, interpolating down to 8-bits? - Can you read/write a 16-bit pixel? > >A question was posted some time ago on this list about the behaviour of >the histogram method on integer images, which went unanswered. Could I >respectfully ask if there is much interest in extending PIL so that there >are working implementations of useful methods such as (for example) >histograms for modes I and F. This raises several implementation >questions, for example it becomes worthwhile caching the extreme values of >the image data, and a histogram of a mode F image would need to define bin >width as well as extremes. > Once again I'm interested, especially for the F format. My thinking is that since full support of 16-bit images in PIL would be a big undertaking, since most processing functions are hard-coded for 8-bits. The next best thing would be to read a 16-bit image and convert it to float, then you can do a lot of processing (employing even packages other then PIL), then you convert back to a 16-bit image and display. That's my thinking, anyway. I'm curious, does this procedure sound reasonable or can anyone point out any flaws with this thinking? >A last question, I have not been able to find out anything about the IM >image format supported by the PIL. Even my prized OReilly Encyclopaedia of >graphics File Formats is silent. Could anyone enlighten me? > >Tom Harris TheNOSPAMPloppies@bigpond.com > [remove NOSPAM to reply] From srichter@cbu.edu Tue Sep 4 04:14:02 2001 From: srichter@cbu.edu (Stephan Richter) Date: Mon, 03 Sep 2001 22:14:02 -0500 Subject: [Image-SIG] Making animated GIFs Message-ID: <5.1.0.14.2.20010903220814.03700a50@mail.cbu.edu> Hello everyone, is there a Python program (preferably using PIL) that can generate animated GIFs? Here a little background: I am developing an online homework system. The person making up the question can already create graphs using a PIL image. But sometimes these graphs need to have small animations, such as sketching the flight of a canon ball. Online means also, that I have multiple users using the system at the same time with different variables. Here my current thoughts: If there is nothing in Python, I will do the following: Make a loop that the user can use generating many GIFs stored in temporary files (using tempfile). Then I use gifmerge (a C program) to merge all the GIFs together. Luckily, gifmerge returns a bit stream, which I can capture without generating a new file. Any ideas? As always, I am grateful to any suggestions or comments!!! Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management From aheitner@andrew.cmu.edu Tue Sep 4 17:47:57 2001 From: aheitner@andrew.cmu.edu (Ari Heitner) Date: Tue, 4 Sep 2001 12:47:57 -0400 Subject: [Image-SIG] PIL from C/C++ Message-ID: <20010904124757.A1123@andrew> [please cc: me on replies] Hi, I poked around thru the PIL docs on pythonware.com, and didn't see anything on this. I admit to not having searched the newsgroup exhaustively. Simple application: I'm adding texture support to VPython (virtualphoton.pc.cc.cmu.edu/projects/visual, sf.net/projects/visualpython), everyone's favorite Python visualization toolkit. VPython is written in C++, using CXX. I don't need much functionality from PIL: load simple images, read the pixels out of them, give them to GL. Easy right? But I haven't seen any docs, or header files in the PIL distribution that seem especially tuned to this (like Numeric's C API stuff). Am I just missing it? Cheers, Ari Heitner From jeske@chat.net Wed Sep 5 02:32:12 2001 From: jeske@chat.net (David Jeske) Date: Tue, 4 Sep 2001 18:32:12 -0700 Subject: [Image-SIG] Re: aliasing on resize or thumnail? Message-ID: <20010904183212.M16114@mozart.chat.net> I also was comparing PIL's resize filter, this time to photoshop. As near as I can tell, the filter paramaters in resize() have no effect. It certainly isn't producing a BILINEAR or BICUBIC filtered resize image. Anyone have any idea about this bug? -- David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske@chat.net From aclover@1value.com Wed Sep 5 13:13:11 2001 From: aclover@1value.com (Clover Andrew) Date: Wed, 5 Sep 2001 14:13:11 +0200 Subject: [Image-SIG] Re: aliasing on resize or thumnail? Message-ID: David Jeske wrote: > As near as I can tell, the filter paramaters in resize() have no > effect. They do blur the picture a little for me, in comparison if NEAREST. I believe what is happening - by design - is that BILINEAR and BICUBIC are just exactly that: they calculate each pixel color from the four pixels closest to it in the original image. This is fine for scaling up of course, but to get a smooth downsampling you need to average out every pixel in the source image covered by the destination pixel, not just the four at the corners. These options work fine if you're reducing an image to one-half (linearly) of its current size, but are pretty poor for any other scale factor below 1. It would be very handy to have some new filter options for scaling down, since thumbnails are indeed an extremely common application of scripted image processing. --=20 Andrew Clover Technical Consultant 1VALUE.com AG From marc@bowery.com Wed Sep 5 15:20:53 2001 From: marc@bowery.com (marc lindahl) Date: Wed, 05 Sep 2001 10:20:53 -0400 Subject: [Image-SIG] Re: aliasing on resize or thumnail? In-Reply-To: Message-ID: > From: "Clover Andrew" > > They do blur the picture a little for me, in comparison if NEAREST. I > believe what is happening - by design - is that BILINEAR and BICUBIC are > just exactly that: they calculate each pixel color from the four pixels > closest to it in the original image. That's not how it's supposed to work, to be an antialising filter, is it? It should apply a linear or bicubic curve over how ever many pixels (in the source) map to the square of destination pixels. Is it a bug, then?? From fredrik@pythonware.com Wed Sep 5 16:00:01 2001 From: fredrik@pythonware.com (Fredrik Lundh) Date: Wed, 5 Sep 2001 17:00:01 +0200 Subject: [Image-SIG] Re: aliasing on resize or thumnail? References: Message-ID: <000d01c1361b$7107fb90$0900a8c0@spiff> marc lindahl wrote: > > They do blur the picture a little for me, in comparison if NEAREST. I > > believe what is happening - by design - is that BILINEAR and BICUBIC are > > just exactly that: they calculate each pixel color from the four pixels > > closest to it in the original image. > > That's not how it's supposed to work, to be an antialising filter, is it? it isn't an anti-aliasing filter: the BILINEAR and BICUBIC resampling filters are intended for geometric transforms (rotations, quadrilateral warps), not thumbnail generation. (and the ANTIALIAS filter isn't available in 1.1.2) you can get a better-than-nothing result by resizing multiple times with the BILINEAR filter; untested: while im.size[0] > size[0] or im.size[1] > size[1]: im = im.resize( (max(size[0], im.size[0]/2), max(size[1], im.size[1]/2)), Image.BILINEAR ) From marc@bowery.com Wed Sep 5 16:18:01 2001 From: marc@bowery.com (marc lindahl) Date: Wed, 05 Sep 2001 11:18:01 -0400 Subject: [Image-SIG] Re: aliasing on resize or thumnail? In-Reply-To: <000d01c1361b$7107fb90$0900a8c0@spiff> Message-ID: > From: "Fredrik Lundh" > Date: Wed, 5 Sep 2001 17:00:01 +0200 > To: > Subject: Re: [Image-SIG] Re: aliasing on resize or thumnail? > > marc lindahl wrote: >>> They do blur the picture a little for me, in comparison if NEAREST. I >>> believe what is happening - by design - is that BILINEAR and BICUBIC are >>> just exactly that: they calculate each pixel color from the four pixels >>> closest to it in the original image. >> >> That's not how it's supposed to work, to be an antialising filter, is it? > > it isn't an anti-aliasing filter: the BILINEAR and BICUBIC resampling > filters are intended for geometric transforms (rotations, quadrilateral > warps), not thumbnail generation. Then why is it even an option in resize(), which doesn't do any geometric transforms, but only resizing? > > (and the ANTIALIAS filter isn't available in 1.1.2) Is there such a filter available in other versions? > > you can get a better-than-nothing result by resizing multiple times > with the BILINEAR filter; untested: > > while im.size[0] > size[0] or im.size[1] > size[1]: > im = im.resize( > (max(size[0], im.size[0]/2), max(size[1], im.size[1]/2)), > Image.BILINEAR > ) That looks like a huge performance hit. Are you seriously suggesting it? What about the ImageFilters? Like perhaps BLUR, BLUR_MORE, SMOOTH, SMOOTH_MORE? What exactly are they doing? Perhaps they could be used to pre-filter an image before shrinking it? From bzdank@sprynet.com Wed Sep 5 23:25:56 2001 From: bzdank@sprynet.com (Buddy Zdankiewicz) Date: Wed, 5 Sep 2001 15:25:56 -0700 Subject: [Image-SIG] The Image.resize problem with BICUBIC and BILINEAR Message-ID: <004501c13659$bc666160$d1caf7a5@oemcomputer> I saw a thread in last months archive about people struggling with image resize issues. I started out my Python learning curve by trying to make a jpeg slide show viewer similar to the one on theO'Reilly Book's accompanying CD (2nd edition covers python 2.0). I wanted to add some auto scaling/sizing. Everything seemed to work well, and there seemed to be differences between NEAREST and BICUBIC so I was happy. from the OReilly distribution # 99-07-28 fl PIL release 1.0 final # # Copyright (c) 1997-99 by Secret Labs AB. # Copyright (c) 1995-97 by Fredrik Lundh. and python 2.0 I didn't start to run into Image.resize problems until after going through a minor upgrade hell.After eventually getting Python 2.1 and IDLE 0.8 installed the original PIL files I was using seemed not to work at all. But my upgrade process may have been to blame. I downloaded the latest Pil file from PythonWare and things at least ran, but the BILINEAR and BICUBIC options produced no recognizable image, only a single colored horizontal line. NEAREST worked as always. I wrote a loop that resized a 400x600 image from 1x1 all the way to 800x800. Oh yeah, it was a jpeg image, I haven't tried any other types. scale value result 1x1-16x16 varying mottled squares 17x17 - 21x21 recognizable image 22x22 and greater was one or two horizontal colored lines. I am also over my head when looking at the source for Image.pi. It seems like resize leads to and endless recursion and I can't see where the BILINEAR value gets used, other than for a recognized value test. I could send some source if that is of interest Edward Zdankiewicz bzdank@sprynet.com (415) 461-8535 From P94468@motorola.com Mon Sep 10 20:48:16 2001 From: P94468@motorola.com (Sutherland Bryce-P94468) Date: Mon, 10 Sep 2001 12:48:16 -0700 Subject: [Image-SIG] raise ImportError Message-ID: <01CA656A687ED211926B00805F7791400879FFFD@az25exm02.geg.mot.com> Greetings, I keep getting this: File "D:\Python22\PIL\Image.py", line 43, in __getattr__ raise ImportError, "The _imaging C module is not installed" ImportError: The _imaging C module is not installed ====== How do install the _imaging C module ? thanks, Bryce From fredrik@pythonware.com Mon Sep 10 21:28:13 2001 From: fredrik@pythonware.com (Fredrik Lundh) Date: Mon, 10 Sep 2001 22:28:13 +0200 Subject: [Image-SIG] raise ImportError References: <01CA656A687ED211926B00805F7791400879FFFD@az25exm02.geg.mot.com> Message-ID: <00f901c13a37$21865ab0$42fb42d5@hagrid> "Sutherland Bryce-P94468" wrote: > File "D:\Python22\PIL\Image.py", line 43, in __getattr__ > raise ImportError, "The _imaging C module is not installed" > ImportError: The _imaging C module is not installed > > ====== > > How do install the _imaging C module ? you look for _imaging.pyd (or _imaging.dll), and move it to your installation's PIL or DLLs directory. if it still doesn't work, fire up an interpreter and type "import _imaging", and let us know what it says. From yesok@leadtech21.com Wed Sep 12 06:13:22 2001 From: yesok@leadtech21.com (yesok) Date: Wed, 12 Sep 2001 14:13:22 +0900 Subject: [Image-SIG] python wrapper for v4l/v4l2 api Message-ID: <3B9EEEF2.B526C736@leadtech21.com> Hello, I am looking for python wrapper for v4l/v4l2 api so that we may see camera images through bttv driver under python. Could you tell me who did that already? If not yet done what is the right steps to follow? Thank you in advance. Yesok Yoon, Leadtech Corp., Bundang, Korea From romain@zzict.com Fri Sep 14 12:16:35 2001 From: romain@zzict.com (Romain Slootmaekers) Date: Fri, 14 Sep 2001 13:16:35 +0200 (CEST) Subject: [Image-SIG] PIL problem Message-ID: Yo, I installed PIL with Python2.1 and also installed the ijg library, but with a simple test program i get 'IOError: decoder jpeg not available' appearantly loading a jpeg works, but resizing doesn't .... can Anybody help me with that ? the program as well as the traceback are below (please respond to me directly as I'm not subscribed to the mailing list) TIA, Sloot ------------------- program ---------------------- # import Image im=Image.open('/home/romain/Appropriately-Left-Handed-2.jpg') print im.format,im.mode,im.size out=im.resize((128,128)) out.save("test.jpg") ------------------ traceback ----------------- Traceback (most recent call last): File "test.py", line 4, in ? out=im.resize((128,128)) File "/home/zope/Python2.1/lib/python2.1/site-packages/PIL/Image.py", line 661, in resize self.load() File "/home/zope/Python2.1/lib/python2.1/site-packages/PIL/ImageFile.py", line 140, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File "/home/zope/Python2.1/lib/python2.1/site-packages/PIL/Image.py", line 243, in _getdecoder raise IOError, "decoder %s not available" % decoder_name IOError: decoder jpeg not available From lbates@syscononline.com Mon Sep 17 22:50:58 2001 From: lbates@syscononline.com (Larry Bates) Date: Mon, 17 Sep 2001 16:50:58 -0500 Subject: [Image-SIG] PIL ImageDraw module question Message-ID: <2C1A673A677CD311988E00902773A6DD35C324@qbert.syscon-computers.com> I have used PIL to do image conversions, but I have a project that I'm working on where I need to place textual information on a TIFF file and save as TIFF. I see how to manipulate the TIFF file, but am unsure how to handle the text. ImageDraw seems to have a text method, but refers to ImageFont class. In looking at the ImageFont class, it refers to BDF and PCF fonts. I'm working in Win32 environment, so I'm confused about how I can make this work with TTF or Type 1 fonts. Any help would be greatly appreciated. Regards, Larry From jonathan.gilligan@vanderbilt.edu Mon Sep 17 22:54:45 2001 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Mon, 17 Sep 2001 16:54:45 -0500 Subject: [Image-SIG] Saving 12-bit grayscale from PIL Message-ID: <5.1.0.14.0.20010917163049.051baa30@g.mail.vanderbilt.edu> I am working extensively with images recorded as 12-bit grayscale. I can successfully read in the raw data using array.array and convert it to an "I" mode PIL image, but I can't then save it, since I can't find a compatible file format for output. The FORMATS file suggests that I should be able to save an "I" image to .png, but when I try to save a 128 * 256 "I" image to file as a .png image, PIL dumps core. I am using ActiveState Python 2.1 for Windows and PIL 1.1.1 (obtained using the ActiveState package manager). When I try to save the image from PIL using "img.save('foo.png','PNG')", where img is an Image.Image object, python tells me, "C:\Python21\PIL\EpsImagePlugin.py:23: DeprecationWarning: the regex module is deprecated; please use the re module import regex, string" and then crashes python with an illegal memory access. Does anyone have any suggestions for working with 12-bit grayscale images using PIL? Thanks, Jonathan Gilligan From jonathan.gilligan@vanderbilt.edu Tue Sep 18 00:07:46 2001 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Mon, 17 Sep 2001 18:07:46 -0500 Subject: [Image-SIG] Re: Saving 12-bit grayscale from PIL Message-ID: <5.1.0.14.0.20010917172356.02e2c1d0@g.mail.vanderbilt.edu> Here is a minimal script to reproduce the problem: import Numeric, Image, PngImagePlugin na = Numeric.cumsum(Numeric.cumsum(Numeric.ones((128,256),Numeric.Int32)),1) print na.shape print na[0,255] print na[1,255] print na[127,0] print na[127,1] print na[127,255] s = na.tostring() img = Image.fromstring('I', (256,128), s) print img.size print img.getpixel((255,0)) print img.getpixel((255,1)) print img.getpixel((0,127)) print img.getpixel((1,127)) print img.getpixel((255,127)) img.save('foo.png') This produces output: >pythonw -u foo.py (128, 256) 256 512 128 256 32768 (256, 128) 256 512 128 256 32768 >Exit code: -1073741819 The crash occurs on line 355 of ImageFile.py: "l, s, d = e.encode(bufsize)". I would note, incidentally, that the PIL 1.1.1 source (http://www.pythonware.com/downloads/Imaging-1.1.1.tar.gz) mixes whitespace and tabs in many of the Imaging-1.1.1\PIL\*.py files. I don't think this would be the source of the problems, but one never knows. Jonathan =========================================================================== Jonathan M. Gilligan He was allying himself to science, for what was science but the absence of prejudice backed by the presence of money? --- Henry James, The Golden Bowl From fredrik@pythonware.com Tue Sep 18 07:33:10 2001 From: fredrik@pythonware.com (Fredrik Lundh) Date: Tue, 18 Sep 2001 08:33:10 +0200 Subject: [Image-SIG] Re: Saving 12-bit grayscale from PIL References: <5.1.0.14.0.20010917172356.02e2c1d0@g.mail.vanderbilt.edu> Message-ID: <003701c1400b$cb7adfd0$3afb42d5@hagrid> Jonathan M. Gilligan wrote: > I am using ActiveState Python 2.1 for Windows and PIL 1.1.1 (obtained using > the ActiveState package manager). When I try to save the image from PIL > using "img.save('foo.png','PNG')", where img is an Image.Image object, > python tells me, "C:\Python21\PIL\EpsImagePlugin.py:23: DeprecationWarning: > the regex module is deprecated; please use the re module import regex, > string" and then crashes python with an illegal memory access Python 2.1 didn't exist when PIL 1.1.1 was released. To get rid of the warnings, use PIL 1.1.2. > Here is a minimal script to reproduce the problem: I doubt it qualifies as minimal when it requires more than one extension library ;-) Does this script work better: import array import Image s = array.array("i", range(256*128)).tostring() img = Image.fromstring('I', (256,128), s) print img.size print img.getpixel((255,0)) print img.getpixel((255,1)) print img.getpixel((0,127)) print img.getpixel((1,127)) print img.getpixel((255,127)) img.save('foo.png') This works for me, with PIL 1.0 through 1.1.2 under Python 1.5.2 through 2.2a3 (all combinations I have on this machine). If it works for you, your problem appears to be on the NumPy side. If it doesn't work for you, the problem appears to a broken build. You can get fresh binary builds from: http://www.pythonware.com/downloads/index.htm#pil The 2.1.1 build should work (you have to move the files by hand from c:\py21, though. make sure you don't have any old PIL stuff in the activestate tree) > I would note, incidentally, that the PIL 1.1.1 source > (http://www.pythonware.com/downloads/Imaging-1.1.1.tar.gz) mixes whitespace > and tabs in many of the Imaging-1.1.1\PIL\*.py files. I don't think this > would be the source of the problems, but one never knows. Oh, please. From jonathan.gilligan@vanderbilt.edu Tue Sep 18 17:40:29 2001 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Tue, 18 Sep 2001 11:40:29 -0500 Subject: [Image-SIG] Re: Saving 12-bit grayscale from PIL In-Reply-To: <003701c1400b$cb7adfd0$3afb42d5@hagrid> References: <5.1.0.14.0.20010917172356.02e2c1d0@g.mail.vanderbilt.edu> Message-ID: <5.1.0.14.0.20010918113648.029974f0@g.mail.vanderbilt.edu> Thanks for the more minimal script. It failed too, but when I followed your advice and used the binaries from Pythonware, everything worked fine. Sorry to annoy you with the comment about mixed whitespace and tabs. I have seen these introduce bugs in other python code by changing scoping, so I honestly didn't know if that might be a problem. Anyway, thanks for the help. I have reported the bug in their PIL build to ActiveState. From he@klaki.net Wed Sep 19 11:02:57 2001 From: he@klaki.net (=?iso-8859-1?Q?Hrafnkell_Eir=EDksson?=) Date: Wed, 19 Sep 2001 10:02:57 +0000 Subject: [Image-SIG] all I get is a white surface Message-ID: <20010919100257.A27928@klaki.net> Hi I just installed PIL 1.1.2 on a Win2k machine with Python 2.1.1. I was trying to use it to view some images. All I got was a white surface with the dimensions of the image. What I did was import Tkinter import Image import ImageTk root = Tkinter.Tk() im = Image.open("c:/Temp/someimg.png") tkim = ImageTk.PhotoImage(im) l = Tkinter.Label(root, image=tkim) l.pack() root.mainloop() Am I doing something wrong here? I've tried different images, and all the images I can view in IE. Btw. what is a good way to convert a string with raw image data (grayscale) to a viewable PhotoImage. I tried using im.put(map(lambda v: "%02x", ord(v), data)), I gave up waiting after 10 min. Thanks Hrafnkell PS: I'm not a member of the list From Aureli.Soria_Frisch@ipk.fhg.de Wed Sep 19 12:57:50 2001 From: Aureli.Soria_Frisch@ipk.fhg.de (Aureli Soria Frisch) Date: Wed, 19 Sep 2001 13:57:50 +0200 Subject: [Image-SIG] all I get is a white surface In-Reply-To: <20010919100257.A27928@klaki.net> Message-ID: Hi I think you should declare a frame after the root: > >import Tkinter >import Image >import ImageTk > >root =3D Tkinter.Tk() win =3D Frame(root) win.pack() >im =3D Image.open("c:/Temp/someimg.png") >tkim =3D ImageTk.PhotoImage(im) and thus change ">l =3D Tkinter.Label(root, image=3Dtkim" to: I=3DTkinter.Label(win,image=3Dtkim) >l.pack() >root.mainloop() > >Btw. what is a good way to convert a string with raw image data (grayscale) >to a viewable PhotoImage. I tried using >im.put(map(lambda v: "%02x", ord(v), data)), I gave up waiting after 10 min= =2E im.fromstring(data), where data is an string. Regards, Aureli ################################# Aureli Soria Frisch =46raunhofer IPK Dept. Pattern Recognition post: Pascalstr. 8-9, 10587 Berlin, Germany e-mail:aureli@ipk.fhg.de fon: +49 30 39006-150 fax: +49 30 3917517 web: http://vision.fhg.de/~aureli/web-aureli_en.html ################################# From he@klaki.net Wed Sep 19 13:09:29 2001 From: he@klaki.net (=?iso-8859-1?Q?Hrafnkell_Eir=EDksson?=) Date: Wed, 19 Sep 2001 12:09:29 +0000 Subject: [Image-SIG] all I get is a white surface In-Reply-To: ; from Aureli.Soria_Frisch@ipk.fhg.de on Wed, Sep 19, 2001 at 01:57:50PM +0200 References: <20010919100257.A27928@klaki.net> Message-ID: <20010919120929.A1381@klaki.net> On 2001-09-19, 13:57:50 (+0200), Aureli Soria Frisch wrote: > I think you should declare a frame after the root: This does not help. The viewer.py example that comes with PIL behaves as well as I am describing. Thanks Hrafnkell From jp@solo.com Thu Sep 27 20:00:15 2001 From: jp@solo.com (jp hebert) Date: Thu, 27 Sep 2001 12:00:15 -0700 (PDT) Subject: [Image-SIG] PIL on macosX Message-ID: <20010927190015.47829.qmail@web20302.mail.yahoo.com> I compiled python and PIL o macosX using Apple's development tools. python works all right, but when I import PIL I get this: >>> from Image import * dyld: python multiple definitions of symbol _heap_free /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics(product_link.o) definition of _heap_free /usr/local/lib/python2.2/site-packages/PIL/_imaging.so definition of _heap_free and then python aborts. how could I fix this? thanks __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com From fredrik@pythonware.com Thu Sep 27 20:44:08 2001 From: fredrik@pythonware.com (Fredrik Lundh) Date: Thu, 27 Sep 2001 21:44:08 +0200 Subject: [Image-SIG] PIL on macosX References: <20010927190015.47829.qmail@web20302.mail.yahoo.com> Message-ID: <00ca01c1478c$c8eaa920$b3fa42d5@hagrid> jp hebert wrote: > I compiled python and PIL o macosX using Apple's > development tools. python works all right, but when I > import PIL I get this: > > >>> from Image import * > dyld: python multiple definitions of symbol _heap_free > /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics(produc t_link.o) > definition of _heap_free > /usr/local/lib/python2.2/site-packages/PIL/_imaging.so > definition of _heap_free > > and then python aborts. how could I fix this? "grep heap_free" would have told you that there's a function with that name in libImaging/QuantHeap.c, which is used twice in libImaging/Quant.c. try renaming that function before rebuilding. From klintprice@cc.usu.edu Sat Sep 29 01:21:30 2001 From: klintprice@cc.usu.edu (Klint Price) Date: Fri, 28 Sep 2001 18:21:30 -0600 Subject: [Image-SIG] PIL.Image and binary data in SQL Message-ID: <000a01c1487c$afd59800$0b010c0a@ingeo.com> This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C1484A.64F656D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Does anyone know how use the PIL.Image to read binary image data from a = database, create thumbnails, and out put the thumbnails to the browser = using a binarywrite, or something to that effect? Using IIS5, MSSQL 7, = and ASP. - Klint ------=_NextPart_000_0007_01C1484A.64F656D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Does anyone know how use the PIL.Image = to read=20 binary image data from a database, create thumbnails, and out put the = thumbnails=20 to the browser using a binarywrite, or something to that effect?  = Using=20 IIS5, MSSQL 7, and ASP.
 
- Klint
------=_NextPart_000_0007_01C1484A.64F656D0-- From scott.rifkin@yale.edu Sun Sep 30 21:43:35 2001 From: scott.rifkin@yale.edu (Scott Rifkin) Date: Sun, 30 Sep 2001 16:43:35 -0400 (EDT) Subject: [Image-SIG] 16-bit tiff images Message-ID: I am looking for a plug-in to the python imaging library which will enable me to deal with 16-bit greyscale tiff images. Could anyone suggest where one might be found or how to modify the existing TIFF plug-in to handle them? Thanks much, Scott Rifkin scott.rifkin@yale.edu