From info@pythonware.com Wed Jun 7 15:07:45 2000 From: info@pythonware.com (PythonWare) Date: Wed, 7 Jun 2000 16:07:45 +0200 Subject: [Image-SIG] ANNOUNCEMENT: The Python Imaging Library, version 1.1 (june 7, 2000) Message-ID: <014a01bfd089$d32b4af0$0500a8c0@secret.pythonware.com> yet another release from the labs: The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities. Version 1.1 moves the Tkinter support to a separate binary module, and fixes a couple of problems caused by incompatible changes in Python 1.6. Get your copy of the source kit here: http://www.pythonware.com/downloads.htm#pil11 For more information, including support options, see the product site: http://www.pythonware.com/products/pil/ enjoy, the pil team "Secret Labs -- makers of fine pythonware since 1997." From fredrik@pythonware.com Wed Jun 7 15:11:45 2000 From: fredrik@pythonware.com (Fredrik Lundh) Date: Wed, 7 Jun 2000 16:11:45 +0200 Subject: [Image-SIG] Re: ANNOUNCEMENT: The Python Imaging Library, version 1.1 (june 7, 2000) Message-ID: <000b01bfd08a$50c51220$0500a8c0@secret.pythonware.com> > Version 1.1 moves the Tkinter support to a separate binary module, > and fixes a couple of problems caused by incompatible changes in > Python 1.6. footnote: this is a maintenance release. I have a bunch of really cool contributions sitting in my inbox, and I hope to get around to integrate some of them really soon now... From robert.klimek@grc.nasa.gov Wed Jun 7 19:00:27 2000 From: robert.klimek@grc.nasa.gov (Bob Klimek) Date: Wed, 07 Jun 2000 14:00:27 -0400 Subject: [Image-SIG] ANNOUNCEMENT: The Python Imaging Library, version 1.1 (june 7, 2000) References: <014a01bfd089$d32b4af0$0500a8c0@secret.pythonware.com> Message-ID: <393E8DBB.B219F391@grc.nasa.gov> Great! Looking forward to checking it out. Thanks for all your contributions. Bob PythonWare wrote: > > yet another release from the labs: > > The Python Imaging Library (PIL) adds image processing capabilities > to your Python interpreter. This library supports many file formats, > and provides powerful image processing and graphics capabilities. > > Version 1.1 moves the Tkinter support to a separate binary module, > and fixes a couple of problems caused by incompatible changes in > Python 1.6. > > Get your copy of the source kit here: > > http://www.pythonware.com/downloads.htm#pil11 > > For more information, including support options, see the product > site: > > http://www.pythonware.com/products/pil/ > > enjoy, > the pil team > > "Secret Labs -- makers of fine pythonware since 1997." > > _______________________________________________ > Image-SIG maillist - Image-SIG@python.org > http://www.python.org/mailman/listinfo/image-sig -- --------------------- Robert B. Klimek NASA Glenn Research Center robert.klimek@grc.nasa.gov --------------------- From h.ragger@aon.at Fri Jun 9 00:13:21 2000 From: h.ragger@aon.at (Harald Ragger) Date: Fri, 9 Jun 2000 01:13:21 +0200 Subject: [Image-SIG] can't draw a simple point or line! help please Message-ID: <001401bfd19f$23ad52f0$8c000a0a@mercurius> When drawing a rectangle theres no problem. but when i try to draw a point or a simple line, I always get errors. Help please!!! thx in advance Harald ****************the code:******************* import Image, ImageDraw size=100 im = Image.new('RGB', (size, size)) draw = ImageDraw.ImageDraw(im) bgcolor = (255, 255, 255) color = (0,0,0) draw.rectangle([0, 0, size, size], fill=bgcolor, outline=color) draw.point(20, 20, fill=bgcolor) del draw # write to disk im.save("d://test2.gif") >>> Traceback (innermost last): File "d:\Programme\Python\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "D:\Programme\Python\Scripts\test1.py", line 9, in ? draw.point(20, 20, fill=bgcolor) TypeError: keyword parameter redefined From jwt-python@dskk.co.jp Fri Jun 9 00:33:19 2000 From: jwt-python@dskk.co.jp (Jim Tittsler) Date: Fri, 9 Jun 2000 08:33:19 +0900 Subject: [Image-SIG] can't draw a simple point or line! help please In-Reply-To: <001401bfd19f$23ad52f0$8c000a0a@mercurius>; from h.ragger@aon.at on Fri, Jun 09, 2000 at 01:13:21AM +0200 References: <001401bfd19f$23ad52f0$8c000a0a@mercurius> Message-ID: <20000609083319.A26055@mail.dskk.co.jp> On Fri, Jun 09, 2000 at 01:13:21AM +0200, Harald Ragger wrote: > When drawing a rectangle theres no problem. but when i try to draw a point > or a simple line, I always get errors. [...] > draw.rectangle([0, 0, size, size], fill=bgcolor, outline=color) > draw.point(20, 20, fill=bgcolor) The first argument to point should be a list of tuples or numeric values (just as you used a sequence of numeric values for rectangle). Try: draw.point([20,20], fill=bgcolor) It makes it easy to draw many points at once. -- Jim Tittsler, Tokyo Python Starship http://starship.python.net/crew/jwt/ From jack@oratrix.nl Fri Jun 9 22:57:14 2000 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 09 Jun 2000 23:57:14 +0200 Subject: [Image-SIG] PIL test suite Message-ID: <20000609215719.47624E2673@oratrix.oratrix.nl> If someone feels the urge: I wouldn't mind a testset for PIL. Even something absolutely basic, that just tests that the various methods and such are available would be helpful already. I include PIL in the standard MacPython and Mac users are apparently very happy with that, bt as I don't use PIL myself each new release means that I just add the new files to the projects, compile it and pray the resulting shared module also works once it compiles without errors. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | ++++ see http://www.xs4all.nl/~tank/ ++++ From esr@thyrsus.com Fri Jun 9 23:19:24 2000 From: esr@thyrsus.com (Eric S. Raymond) Date: Fri, 9 Jun 2000 18:19:24 -0400 Subject: [Image-SIG] RFC: Including PIL in 1.6 In-Reply-To: <20000609215719.47624E2673@oratrix.oratrix.nl>; from jack@oratrix.nl on Fri, Jun 09, 2000 at 11:57:14PM +0200 References: <20000609215719.47624E2673@oratrix.oratrix.nl> Message-ID: <20000609181924.A15728@thyrsus.com> Jack Jansen : > I include PIL in the standard MacPython and Mac users are apparently > very happy with that [...] I think it's time to consider including PIL in the core Python 1.6 release. I've been following the work being done over there, and I believe the code has reached a sufficient level of maturity to justify this. The "Batteries are included" philosophy seems to me to imply that we ought to be looking for application libraries to promote into the core once we're satisfied that they meet core-Pythonic standards of good API design, stability, general usefulness, and documentation quality. PIL seems to me like a good candidate on all counts. Guido has to make the final call, of course. But let's have the discussion now so we can develop a yea or nay consensus on ther list. -- Eric S. Raymond Society in every state is a blessing, but government even in its best state is but a necessary evil; in its worst state an intolerable one; for when we suffer, or are exposed to the same miseries *by a government*, which we might expect in a country *without government*, our calamities is heightened by reflecting that we furnish the means by which we suffer." -- Thomas Paine From pingster@ilm.com Fri Jun 9 23:28:27 2000 From: pingster@ilm.com (Ka-Ping Yee) Date: Fri, 9 Jun 2000 15:28:27 -0700 (PDT) Subject: [Image-SIG] Re: [Python-Dev] RFC: Including PIL in 1.6 In-Reply-To: <20000609181924.A15728@thyrsus.com> Message-ID: On Fri, 9 Jun 2000, Eric S. Raymond wrote: > Jack Jansen : > > I include PIL in the standard MacPython and Mac users are apparently > > very happy with that [...] > > I think it's time to consider including PIL in the core Python 1.6 release. > I've been following the work being done over there, and I believe the > code has reached a sufficient level of maturity to justify this. I'm +0. Well, perhaps +0.1. I guess what i would really be "+" about is something to the effect of "a popular Linux distribution decides to throw in the .so for PIL". Then it wouldn't really matter to me whether it was in the "real" standard distribution. -- ?!ng "The police are not here to create disorder. They're here to preserve disorder." -- Former Chicago mayor Daley From robert.klimek@grc.nasa.gov Mon Jun 12 16:24:51 2000 From: robert.klimek@grc.nasa.gov (Bob Klimek) Date: Mon, 12 Jun 2000 11:24:51 -0400 Subject: [Image-SIG] RFC: Including PIL in 1.6 References: <20000609215719.47624E2673@oratrix.oratrix.nl> <20000609181924.A15728@thyrsus.com> Message-ID: <394500C3.865290C8@grc.nasa.gov> In general I like the idea. Wouldn't have to install a separate package. But what about contributions and improvements? How would they get into the system? You'd need to also provide a good canvas to display the images on. Piddle has a good one I hear. "Eric S. Raymond" wrote: > > > I think it's time to consider including PIL in the core Python 1.6 release. > I've been following the work being done over there, and I believe the > code has reached a sufficient level of maturity to justify this. > > The "Batteries are included" philosophy seems to me to imply that we > ought to be looking for application libraries to promote into the core > once we're satisfied that they meet core-Pythonic standards of good > API design, stability, general usefulness, and documentation quality. > PIL seems to me like a good candidate on all counts. > > Guido has to make the final call, of course. But let's have the discussion > now so we can develop a yea or nay consensus on ther list. > -- --------------------- Robert B. Klimek NASA Glenn Research Center robert.klimek@grc.nasa.gov --------------------- From jack@oratrix.nl Tue Jun 13 09:54:53 2000 From: jack@oratrix.nl (Jack Jansen) Date: Tue, 13 Jun 2000 10:54:53 +0200 Subject: [Image-SIG] RFC: Including PIL in 1.6 In-Reply-To: Message by Bob Klimek , Mon, 12 Jun 2000 11:24:51 -0400 , <394500C3.865290C8@grc.nasa.gov> Message-ID: <20000613085453.E1001370CF2@snelboot.oratrix.nl> I've been including the PIL, img and Numeric packages with the standard MacPython distributions for a couple of years now, and the only one that gets some discussion on the mailing list is Numeric. This may mean that PIL and img are virtually unused, or it may mean that they're so polished that there's no reason to discuss them, I'm not sure. I think that we should get some feeling for the percentage of the Python community that wants PIL before we should start bugging Guido to include it. And even if there is a sizeable community we should probably also watch how the distutils people are getting along. Easily obtaining extension packages is on their charter, if they manage to pull the trick off in a way that also works for Mac and Windows (and also for Mac and Windows systsmes without a compiler!) then there isn't all that much reason to bundle anymore. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From peter@schneider-kamp.de Tue Jun 13 10:09:18 2000 From: peter@schneider-kamp.de (Peter Schneider-Kamp) Date: Tue, 13 Jun 2000 11:09:18 +0200 Subject: [Image-SIG] crash: Image.open("lena.ppm").show() Message-ID: <3945FA3E.5619F69D@stud.ntnu.no> I am using PIL 1.1 with the current CVS version under GNU/Linux. >>> Image.open("lena.ppm").show() Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line 818, in show _showxv(self, title, command) File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line 1151, in _showxv file = self._dump(format=format) File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line 355, in _dump file = file + "." + format TypeError: illegal argument type for built-in operation The reason seems to be that format == None (passed somehow from _showxv. Note that the line numbers given vary from the original version because I used pindent to change the indentation. I fixed it for me by replacing the line with: file = file + "." + self.format Why does _showxv always pass format=None for non "nt" OSes? Peter -- Peter Schneider-Kamp ++47-7388-7331 Herman Krags veg 51-11 mailto:peter@schneider-kamp.de N-7050 Trondheim http://schneider-kamp.de From fredrik@pythonware.com Tue Jun 13 12:22:08 2000 From: fredrik@pythonware.com (Fredrik Lundh) Date: Tue, 13 Jun 2000 13:22:08 +0200 Subject: [Image-SIG] crash: Image.open("lena.ppm").show() References: <3945FA3E.5619F69D@stud.ntnu.no> Message-ID: <007b01bfd52a$137969d0$0500a8c0@secret.pythonware.com> Peter Schneider-Kamp wrote: > I am using PIL 1.1 with the current CVS version under GNU/Linux. >=20 > >>> Image.open("lena.ppm").show() > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line = 818, > in show > _showxv(self, title, command) > File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line = 1151, > in _showxv > file =3D self._dump(format=3Dformat) > File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line = 355, > in _dump > file =3D file + "." + format > TypeError: illegal argument type for built-in operation >=20 > The reason seems to be that format =3D=3D None (passed somehow > from _showxv. Note that the line numbers given vary from the > original version because I used pindent to change the indentation. >=20 > I fixed it for me by replacing the line with: > file =3D file + "." + self.format >=20 > Why does _showxv always pass format=3DNone for non "nt" OSes? it's a known bug, and for some reason, the fix didn't make it into the 1.1 release :-( iirc, the "correct" way to fix this is to change: format =3D None to format =3D "PPM" in the _showxv function. From herzog@online.de Tue Jun 13 23:34:27 2000 From: herzog@online.de (Bernhard Herzog) Date: 14 Jun 2000 00:34:27 +0200 Subject: [Image-SIG] Another bug not yet fixed in 1.1 (PIL as a package) Message-ID: Digging deeply into my Image-SIG archives to September 1999.... "Fredrik Lundh" writes: > > I read somewhere that the current PIL release should work > > equally well as plain modules (with PIL.pth) or as a package. > > I may have misunderstood this, but the only problem I found > > should be fairly easy to fix. The preinit() and init() methods > > search for the plug-ins on sys.path. This fails if PIL is > > installed as a package (I was fooled myself first, because I > > still had a non-package installation around on my system...). > > Anthony Baxter pointed this out a while ago, and > Fred Drake came up with the following solution: > > import sys > try: > path = __path__ > except NameError: > path = sys.path > > which will be in the forthcoming maintenance > release (PIL 1.0.1). This isn't even fixed in 1.1! -- Bernhard Herzog | Sketch, a drawing program for Unix herzog@online.de | http://sketch.sourceforge.net/ From bryan@dunsinane.net Wed Jun 14 09:48:50 2000 From: bryan@dunsinane.net (Bryan Willett) Date: Wed, 14 Jun 2000 02:48:50 -0600 (MDT) Subject: [Image-SIG] PNG and compression Message-ID: I'm using PIL to create maps for my game: merchempires.sourceforge.net I don't know anything about the technicals of image file formats. I want my maps to have the smallest image file size as possible. The pngs that PIL creates are not as small as the pngs that I can create with the GIMP. I can open a png created with PIL in the GIMP and save it out using the gimps 9 compression setting for a png and I get a smaller file. The gimp has a "indexed" setting for png file. I don't know what that is compared to RGB but all PIL pngs open up in the gimp as RGB, not indexed. My question is how do I create these smaller sized files with PIL. There is supposed to be a optimization option for saving pngs but I can't get it to work. What is the complete synxtax for saving an image with optimization? Anyone have advice on producing more compressed pngs with PIL? Thanks please reply to bryan@dunsinane.net From peter@schneider-kamp.de Wed Jun 14 12:21:00 2000 From: peter@schneider-kamp.de (Peter Schneider-Kamp) Date: Wed, 14 Jun 2000 13:21:00 +0200 Subject: [Image-SIG] Python and Video for Windows? Message-ID: <39476A9C.DFE84D0@stud.ntnu.no> I am currently working on a robot control project and I have to use a Video for Windows compatible video camera. Is there any possibility to get this working with Python? Or is there some C/C++/Java based solution which I could easily write an extension for? All I need is really the raw image data. No fancy control stuff or gamma correction. don't-wanna-do-it-in-C++---please-save-me-ly y'rs Peter -- Peter Schneider-Kamp ++47-7388-7331 Herman Krags veg 51-11 mailto:peter@schneider-kamp.de N-7050 Trondheim http://schneider-kamp.de From mmiller3@iupui.edu Wed Jun 14 14:59:59 2000 From: mmiller3@iupui.edu (Michael A. Miller) Date: 14 Jun 2000 08:59:59 -0500 Subject: [Image-SIG] RFC: Including PIL in 1.6 In-Reply-To: Jack Jansen's message of "Tue, 13 Jun 2000 10:54:53 +0200" References: <20000613085453.E1001370CF2@snelboot.oratrix.nl> Message-ID: <87vgzcicrk.fsf@lumen.med.iupui.edu> >>>>> "Jack" == Jack Jansen writes: > I've been including the PIL, img and Numeric packages with > the standard MacPython distributions for a couple of years > now, [...] They are also included in the standard Debian distribution. -- Michael A. Miller mmiller@debian.org From mvmendes@mailcity.com Fri Jun 16 12:55:27 2000 From: mvmendes@mailcity.com (Marcus Mendes) Date: Fri, 16 Jun 2000 04:55:27 -0700 Subject: [Image-SIG] Generating and puting images over images Message-ID: Hello, I have a map with various positions defined, ie, my map is divided in many small parts with its numbers (I think that seems as an array of small images). My mission is put another image over each these small images, leaving them as background images. I asked : Should I use an array of these images? And how can I to do it? Someone can help me? Thanks in advance. Marcus Send FREE Greetings for Father's Day--or any day! Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct From kcaza@cymbolic.com Fri Jun 16 17:08:47 2000 From: kcaza@cymbolic.com (kcaza@cymbolic.com) Date: Fri, 16 Jun 2000 09:08:47 -0700 Subject: [Image-SIG] Generating and puting images over images Message-ID: <88256900.0058B21A.00@mail.cymbolic.com> The Image.paste command should work fine, but you may want to look into using an image mask to do it. Using a mask, you can paste odd-shaped regions of an image, or paste an image semi-transparently over another. All you need is a grayscale image file the same size as both images, where you paint the mask in black/white/gray. When you paste the two real images together, specify the mask as well. ImA = Image.open ("background.tif") ImB = Image.open ("foreground.tif") ImC = Image.open ("grayscale_mask.tif") ImD = ImA.paste(ImB, (0,0), ImC) ImD.save("combined.tif") Kevin Cazabon "Marcus Mendes" on 06/16/2000 04:55:27 AM Please respond to mvmendes@mailcity.com To: image-sig@python.org cc: (bcc: Kevin Cazabon/cymbolic/gig) Subject: [Image-SIG] Generating and puting images over images Hello, I have a map with various positions defined, ie, my map is divided in many small parts with its numbers (I think that seems as an array of small images). My mission is put another image over each these small images, leaving them as background images. I asked : Should I use an array of these images? And how can I to do it? Someone can help me? Thanks in advance. Marcus Send FREE Greetings for Father's Day--or any day! Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://www.python.org/mailman/listinfo/image-sig From ghaley@venaca.com Mon Jun 19 21:56:34 2000 From: ghaley@venaca.com (Gregory Haley) Date: Mon, 19 Jun 2000 16:56:34 -0400 Subject: [Image-SIG] problems with simple task. Message-ID: <394E8902.4AC1DB3C@venaca.com> hi folks, i am having a problem running the simplest, and most introductory script. i am trying the generate a simple rectange. i've copied the scripts that have been posted to this sig, and the one that is included in the PIL tutorial. it does not matter if i do this as a script or in the python interpreter. i was wondering if i am missing something REALLY obvious, or if there is some sort of component to PIL that i am missing: a copy of the script: import PIL from PIL import _imaging, Image, ImageDraw import re, os, string, sys import cStringIO size = 100 im = Image.new('RGB", (size, size)) draw = ImageDraw.ImageDraw(im) bgcolor = (255, 0, 0) #should be red background fgcolor = (0, 0, 0) #should be black border im = draw.rectangle( [0,0, size, size], fill=bgcolor, outline=fgcolor ) del draw outFile = cStringIO.StringIO() im.save(outFile, 'GIF') the error i get is: Traceback (innermost last): File './image1.py", line 25, in ? im.save(outFile, 'GIF') AttributeError: 'None' object has no attribute 'save' i've tried to rewrite this using a file handle to open the outfile, but the error is basically the same, which has to do with the im.save call. any advice will be deeply appreciated. ciao! greg. Gregory Haley Venaca.com From sabren@manifestation.com Mon Jun 19 22:26:33 2000 From: sabren@manifestation.com (Michal Wallace) Date: Mon, 19 Jun 2000 17:26:33 -0400 (EDT) Subject: [Image-SIG] help compiling PIL Message-ID: Hey all, I'm having a real hard time getting PIL 1.1 to compile on my machine. It seems to compile correctly, but when I try to actually use it, I get: >>> import _imaging Traceback (innermost last): File "", line 1, in ? ImportError: Undefined symbol "_ImagingSavePPM" in python:./_imaging.so Can someone help me out here? Thanks, - Michal ------------------------------------------------------------------------ www.manifestation.com www.sabren.com www.linkwatcher.com www.zike.net ------------------------------------------------------------------------ From jwt-python@dskk.co.jp Tue Jun 20 02:11:00 2000 From: jwt-python@dskk.co.jp (Jim Tittsler) Date: Tue, 20 Jun 2000 10:11:00 +0900 Subject: [Image-SIG] problems with simple task. In-Reply-To: <394E8902.4AC1DB3C@venaca.com>; from ghaley@venaca.com on Mon, Jun 19, 2000 at 04:56:34PM -0400 References: <394E8902.4AC1DB3C@venaca.com> Message-ID: <20000620101100.B27731@mail.dskk.co.jp> On Mon, Jun 19, 2000 at 04:56:34PM -0400, Gregory Haley wrote: > im = Image.new('RGB", (size, size)) > draw = ImageDraw.ImageDraw(im) > bgcolor = (255, 0, 0) #should be red background > fgcolor = (0, 0, 0) #should be black border > > im = draw.rectangle( [0,0, size, size], fill=bgcolor, > outline=fgcolor ) Try making this line simply: draw.rectangle( [0,0, size, size], fill=bgcolor, outline=fgcolor ) (You don't want to assign the result of the rectangle method to your 'im' image object.) http://www.pythonware.com/library/pil/handbook/imagedraw.htm -- Jim Tittsler, Tokyo Python Starship http://starship.python.net/crew/jwt/ From sabren@manifestation.com Tue Jun 20 04:57:26 2000 From: sabren@manifestation.com (Michal Wallace) Date: Mon, 19 Jun 2000 23:57:26 -0400 (EDT) Subject: [Image-SIG] help compiling PIL In-Reply-To: <14670.39218.852003.578491@gargle.gargle.HOWL> Message-ID: On Mon, 19 Jun 2000, Les Schaffer wrote: > what are you using for compile tools? i just built the library and it > runs fine ... but my linker gives this: > > (gustav)~/system/Imaging-1.1/libImaging/: nm libImaging.a | grep ImagingSavePPM > 00000324 T ImagingSavePPM > > no underscore.. where does your underscore come from????? I use just plain old "make" ... gcc 2.7.2.1... I typed the same command and I get: [~/src/Imaging-1.1/libImaging]: nm libImaging.a | grep ImagingSavePPM 0000031c T _ImagingSavePPM [~/src/Imaging-1.1/libImaging]: grep ImagingSavePPM *.h *.c Imaging.h:extern int ImagingSavePPM(Imaging im, const char* filename); File.c:ImagingSavePPM(Imaging im, const char* outfile) coretest.c: ImagingSavePPM(im3, "wedge.ppm"); coretest.c: ImagingSavePPM(im, "test.ppm"); Any idea what might be happening? Cheers, - Michal ------------------------------------------------------------------------ www.manifestation.com www.sabren.com www.linkwatcher.com www.zike.net ------------------------------------------------------------------------ From loris@caren.demon.co.uk Wed Jun 21 12:20:39 2000 From: loris@caren.demon.co.uk (Loris Caren) Date: Wed, 21 Jun 2000 12:20:39 +0100 Subject: [Image-SIG] Font Support in PIL Message-ID: <00062112283606.00981@caren.cec> Hello, I'm try to create some fonts that can be read by the ImageFont library using bdf2pil. However it dies in font2image saying that Image.core.hex_decoder should have two args rather than the one provided. I've tried greping for hex_decoder in the library but dont get any hits. Can anybody else get this to work? Without it I can't see how that I can write text using the ImageDraw library. From ghaley@venaca.com Wed Jun 21 21:42:46 2000 From: ghaley@venaca.com (Gregory Haley) Date: Wed, 21 Jun 2000 16:42:46 -0400 Subject: [Image-SIG] looking for PythonMagick Message-ID: <395128C6.1DAF788B@venaca.com> Hi, I tried to fetch the PythonMagick interface to ImageMagick, but it appears that the person who had the directory is no longer at Brown -- an email to the maintainer (obtained via spaceship) bounced. Can anyone direct me to a current version of this module, please? Many thanks. ciao! greg. Gregory Haley venaca.com From ghaley@venaca.com Wed Jun 21 21:42:46 2000 From: ghaley@venaca.com (Gregory Haley) Date: Wed, 21 Jun 2000 16:42:46 -0400 Subject: [Image-SIG] looking for PythonMagick Message-ID: <395128C6.1DAF788B@venaca.com> Hi, I tried to fetch the PythonMagick interface to ImageMagick, but it appears that the person who had the directory is no longer at Brown -- an email to the maintainer (obtained via spaceship) bounced. Can anyone direct me to a current version of this module, please? Many thanks. ciao! greg. Gregory Haley venaca.com From kcazabon" Message-ID: <001b01bfdc5a$b74e69c0$16107118@rct1.bc.wave.home.com> Hi Loris; I while back I created a whole bunch of font sets for PIL because I was having the same problems. One of the other users (Piers Lauder) kindly provided FTP space for them, as they're quite large (even when zipped). They're available at the following address if you'd like to download "pre-PIL-ified" fonts. http://www.cs.usyd.edu.au/~piers/python/pilfonts.html Kevin Cazabon ----- Original Message ----- From: "Loris Caren" To: Sent: Wednesday, June 21, 2000 4:20 AM Subject: [Image-SIG] Font Support in PIL > Hello, > I'm try to create some fonts that can be read by the ImageFont library using > bdf2pil. However it dies in font2image saying that Image.core.hex_decoder > should have two args rather than the one provided. > I've tried greping for hex_decoder in the library but dont get any hits. Can > anybody else get this to work? Without it I can't see how that I can write > text using the ImageDraw library. > > _______________________________________________ > Image-SIG maillist - Image-SIG@python.org > http://www.python.org/mailman/listinfo/image-sig From fredrik@pythonware.com Thu Jun 22 16:44:08 2000 From: fredrik@pythonware.com (Fredrik Lundh) Date: Thu, 22 Jun 2000 17:44:08 +0200 Subject: [Image-SIG] help compiling PIL References: Message-ID: <007b01bfdc60$b675ae40$0900a8c0@SPIFF> Michal Wallace wrote: > I'm having a real hard time getting PIL 1.1 to compile on my machine. > It seems to compile correctly, but when I try to actually use it, I > get: > > >>> import _imaging > Traceback (innermost last): > File "", line 1, in ? > ImportError: Undefined symbol "_ImagingSavePPM" in python:./_imaging.so > > Can someone help me out here? I have no idea... the only difference I see is that I'm using a newer compiler (we just upgraded our servers), but I'm sure I've compiled earlier versions of PIL with 2.7.2 without problems. You could try #undef'ing the WITH_DEBUG flag in _imaging.so. Or update your compiler... cheers /F From sabren@manifestation.com Thu Jun 22 19:10:05 2000 From: sabren@manifestation.com (Michal Wallace) Date: Thu, 22 Jun 2000 14:10:05 -0400 (EDT) Subject: [Image-SIG] looking for PythonMagick In-Reply-To: <395128C6.1DAF788B@venaca.com> Message-ID: On Wed, 21 Jun 2000, Gregory Haley wrote: > Hi, > > I tried to fetch the PythonMagick interface to ImageMagick, > but it appears that the person who had the directory is no > longer at Brown -- an email to the maintainer (obtained via > spaceship) bounced. Can anyone direct me to a current > version of this module, please? > http://starship.python.net/~zack/ Cheers, - Michal ------------------------------------------------------------------------ www.manifestation.com www.sabren.com www.linkwatcher.com www.zike.net ------------------------------------------------------------------------ From ghaley@venaca.com Thu Jun 22 20:04:35 2000 From: ghaley@venaca.com (Gregory Haley) Date: Thu, 22 Jun 2000 15:04:35 -0400 Subject: [Image-SIG] looking for PythonMagick References: Message-ID: <39526343.6DB56F16@venaca.com> > http://starship.python.net/~zack/ hi michael, actually, that link leads to an ftp site at: ftp.lems.brown.edu/pub/turtles/magick/ i was able to ftp into the turtles level, but the magick directory is gone, and the email adddress that was linked from the starship web page bounced. i did quite a bit of searching yesterday for an alternative location, but i think all of them led back to the brown site. darn. ciao! greg. Gregory Haley venaca.com From ghaley@venaca.com Fri Jun 23 19:43:11 2000 From: ghaley@venaca.com (Gregory Haley) Date: Fri, 23 Jun 2000 14:43:11 -0400 Subject: [Image-SIG] help with paste Message-ID: <3953AFBF.D129FBF8@venaca.com> hi folks, i am trying to get some images to paste into a larger image. from the docmentation, it appears that i need to use paste, but i keep getting an error when i try to do the paste that the images don't match. i suspect i a missing something fairly obvious were i better at reading the method prototype. attached is the pertinent snippet of code. *-*-* snip *-*-* im1 = Image.new('RGB', (size0, size0)) draw = ImageDraw.ImageDraw(im1) ink = (0,0,0) fill = (255,0,255) draw.rectangle( [0, 0, size0, size0], fill=fill, outline=ink) size1 = 300 im2 = Image.new('RGB', (size1, size1)) draw = ImageDraw.ImageDraw(im2) ink = (0,0,0) fill = (255,255,0) draw.rectangle( [0, 0, size0, size0], fill=fill, outline=ink) im3 = Image.new('RGB', (size0, size0)) draw = ImageDraw.ImageDraw(im3) im = im1.paste(im2, (500, 500), im3) *-*-* snip *-*-* what i want to create is something along the following: the *** will be rectangles, the lengths based on data passed in, and the colors changing to differentiate categories. the widths of each rectangle will be 10, the distance between each rectangle will be 5px. the heighth of the box will be a function of the number of rectangles needed, and the width of the box will be a function of the length of the longest rectangle plus +/- 10px. the final image will be passed via zope into a dtml method and will not be a real file. there is a zope Poll product that uses the pie slice funtion in PIL to do this. it seems like it would be possible to do this. +----------------------------+ | | | ***** | | | | ************ | | | | ********* | | | | ********************** | | | +----------------------------+ i have gotten it to where i can generate all of the part as gif files, but doing this dynamically continues to ellude me. any insights will be most appreciated. any help will be greatly appreciated. thanks. ciao! greg. Gregory Haley venaca.com From jwt-python@dskk.co.jp Sat Jun 24 06:15:24 2000 From: jwt-python@dskk.co.jp (Jim Tittsler) Date: Sat, 24 Jun 2000 14:15:24 +0900 Subject: [Image-SIG] help with paste In-Reply-To: <3953AFBF.D129FBF8@venaca.com>; from ghaley@venaca.com on Fri, Jun 23, 2000 at 02:43:11PM -0400 References: <3953AFBF.D129FBF8@venaca.com> Message-ID: <20000624141524.A13536@mail.dskk.co.jp> On Fri, Jun 23, 2000 at 02:43:11PM -0400, Gregory Haley wrote: > size1 = 300 > im2 = Image.new('RGB', (size1, size1)) [...] > im3 = Image.new('RGB', (size0, size0)) > draw = ImageDraw.ImageDraw(im3) > im = im1.paste(im2, (500, 500), im3) It looks like you are trying to paste im2 into im1, using im3 as a mask. Does size0==size1? I believe the mask needs to be the same size as the image it applies to, so in this case im2 and im3 need to be the same size. (But your im3 would appear to make a pretty boring mask. :-) -- Jim Tittsler, Tokyo Python Starship http://starship.python.net/crew/jwt/ From sabren@manifestation.com Fri Jun 30 15:04:15 2000 From: sabren@manifestation.com (Michal Wallace) Date: Fri, 30 Jun 2000 10:04:15 -0400 (EDT) Subject: [Image-SIG] help compiling PIL In-Reply-To: <007b01bfdc60$b675ae40$0900a8c0@SPIFF> Message-ID: Hey Fredrik, everyone: On Thu, 22 Jun 2000, Fredrik Lundh wrote: > Michal Wallace wrote: > > I'm having a real hard time getting PIL 1.1 to compile on my machine. > > It seems to compile correctly, but when I try to actually use it, I > > get: > > > > >>> import _imaging > > Traceback (innermost last): > > File "", line 1, in ? > > ImportError: Undefined symbol "_ImagingSavePPM" in python:./_imaging.so > > > > Can someone help me out here? > > I have no idea... the only difference I see is that I'm using a newer > compiler (we just upgraded our servers), but I'm sure I've compiled > earlier versions of PIL with 2.7.2 without problems. > You could try #undef'ing the WITH_DEBUG flag in _imaging.so. Didn't help. :/ > Or update your compiler... Maybe, but I'm really trying to avoid that. I think my problem is that I just don't know what I'm doing as far as linking goes. :) I only know a little C, and I'm a total newbie when it comes to compiling and linking multi-file programs. The File.o file in the libImaging directory compile just fine, and seems to have the symbols defined, but coretest.o doesn't: [~/src/Imaging-1.1/libImaging]: nm -t *.o | grep _ImagingSavePPM File.o|0000031c|T|_ImagingSavePPM coretest.o||U|_ImagingSavePPM .. Nor does _imaging.o [~/src/Imaging-1.1/libImaging]: cd .. [~/src/Imaging-1.1]: nm -t *.o | grep _ImagingSavePPM _imaging.o||U|_ImagingSavePPM (for some reason, the compiler puts an underscore in front of every symbol, but it happens with everything, so that isn't the problem) One thing: make really did not like the backslashes at the ends of the lines in the Setup.in file, so I took them out. So the _imaging lines for my Setup file look like this: _imaging _imaging.c decode.c encode.c map.c display.c outline.c path.c -IlibImaging -IlibImaging/libImaging.a -lImaging ------ Maybe a better question is: Has anyone on this list successfully compiled PIL on a shell account at pair.com? Cheers, - Michal ------------------------------------------------------------------------ www.manifestation.com www.sabren.com www.linkwatcher.com www.zike.net ------------------------------------------------------------------------