From mcoleman2@kc.rr.com Wed Dec 6 08:14:35 2000 From: mcoleman2@kc.rr.com (Mike Coleman) Date: Wed, 6 Dec 2000 02:14:35 -0600 (CST) Subject: [Image-SIG] question and bug? Message-ID: Hi, I was playing with the Image module, and have a question and maybe see a bug. The question is, is there any way to set individual pixels? That is, I'd like to compute a channel as a function of two other channels. Is this possible? The bug appears with the code below when the images are 'show'ed. The displayed images do look approximately correct, but there is a strange chunk artifact going on. That is, the image looks like it were assembled from individual squares, about 16x16 pixels I'm guessing. There is no such artifact in the source, that I can see. Is this supposed to work? Thanks --Mike import Image import ImageChops im = Image.open("/tmp/peppers.jpg") print im.size print im.mode out = im.point(lambda x: x * 0.5) #out.show() r, g, b = im.split() dgr = ImageChops.subtract(r, g, 1, 128) dgr.show() #r.show() #g.show() #b.show() im2 = Image.merge("RGB", (dgr, dgr, dgr)) im2.show() From carl@cyberoptics.com Wed Dec 6 17:56:21 2000 From: carl@cyberoptics.com (Carl Haugan) Date: Wed, 06 Dec 2000 11:56:21 -0600 Subject: [Image-SIG] question and bug? References: Message-ID: <3A2E7DC5.F02E45F3@cyberoptics.com> What sort of function? A simple X = a*Y + (1-a)*Z can be done with Image.blend(Z,Y,a); for more complex functions (X = Y * cos(Z) ) I like to use Numeric. Mike Coleman wrote: > > Hi, > > I was playing with the Image module, and have a question and maybe see a bug. > The question is, is there any way to set individual pixels? That is, I'd like > to compute a channel as a function of two other channels. Is this possible? > .... > _______________________________________________ > Image-SIG maillist - Image-SIG@python.org > http://www.python.org/mailman/listinfo/image-sig -- Carl Haugan carl@cyberoptics.com CyberOptics Corporation Minneapolis, MN From mcoleman2@kc.rr.com Thu Dec 7 01:12:46 2000 From: mcoleman2@kc.rr.com (Mike Coleman) Date: 06 Dec 2000 19:12:46 -0600 Subject: [Image-SIG] question and bug? In-Reply-To: Carl Haugan's message of "Wed, 06 Dec 2000 11:56:21 -0600" References: <3A2E7DC5.F02E45F3@cyberoptics.com> Message-ID: <87zoi9yqy9.fsf@subterfugue.org> Carl Haugan writes: > What sort of function? A simple X = a*Y + (1-a)*Z can be done with > Image.blend(Z,Y,a); for more complex functions (X = Y * cos(Z) ) I like > to use Numeric. The latter sounds closer to what I'd like to do (the function is a messy function from X,Y to X0,Y0), but I don't see how to get pixel data in and out of an Image (aside from saving it to a file). I've read the doc, but maybe I missed it. How can I just manipulate pixel values directly, one by one? --Mike > > Mike Coleman wrote: > > > > Hi, > > > > I was playing with the Image module, and have a question and maybe see a bug. > > The question is, is there any way to set individual pixels? That is, I'd like > > to compute a channel as a function of two other channels. Is this possible? > > > .... > > _______________________________________________ > > Image-SIG maillist - Image-SIG@python.org > > http://www.python.org/mailman/listinfo/image-sig > > -- > Carl Haugan carl@cyberoptics.com > CyberOptics Corporation > Minneapolis, MN > -- [O]ne of the features of the Internet [...] is that small groups of people can greatly disturb large organizations. --Charles C. Mann From nick@nickbower.com Thu Dec 7 01:57:02 2000 From: nick@nickbower.com (Nick Bower) Date: Thu, 07 Dec 2000 01:57:02 GMT Subject: [Image-SIG] question and bug? In-Reply-To: <87zoi9yqy9.fsf@subterfugue.org> References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> Message-ID: <20001207.1570200@cricket.> > of an Image (aside from saving it to a file). I've read the doc, but = maybe I > missed it. How can I just manipulate pixel values directly, one by on= e? as another poster said, you could use numeric python to manipulate=20 individual array elements, then when you're ready and done with all the = calculations, throw the entire thing into an image. for a single band=20 image "im": data =3D resize(array(im.getdata(), typecode=3DInt),(im.size[1],im.size[= 0])) ...do stuff to data... im2 =3D Image.new('L',data.shape[1],data.shape[0]) im2.putdata(data.flat) where data is the 2D array. If you really want to do it all in PIL on a pixel by pixel basis, from=20 the PIL documentation: "putpixel putpixel(xy, colour). Modifies the pixel at the given position. The colour is given as a singl= e=20 numerical value for single-band images, and a tuple for multi-band=20 images. For more extensive changes, use paste or the ImageDraw module=20 instead." nick From craig.mcfarland@greatplains.com Thu Dec 7 06:44:50 2000 From: craig.mcfarland@greatplains.com (Craig McFarland) Date: Thu, 7 Dec 2000 00:44:50 -0600 Subject: [Image-SIG] Binary distribution of PIL 1.1.1 for WIN/NT?? Message-ID: <6B26EB0E3471D311AFE40008C791D079023FE9F8@exchange4.greatplains.com> Any pointers to a binary distribution of PIL 1.1.1 for Win NT? Thx.. --- Craig E. McFarland Craig.McFarland@greatplains.com From bh@intevation.de Thu Dec 7 09:23:40 2000 From: bh@intevation.de (Bernhard Herzog) Date: 07 Dec 2000 10:23:40 +0100 Subject: [Image-SIG] Binary distribution of PIL 1.1.1 for WIN/NT?? In-Reply-To: Craig McFarland's message of "Thu, 7 Dec 2000 00:44:50 -0600" References: <6B26EB0E3471D311AFE40008C791D079023FE9F8@exchange4.greatplains.com> Message-ID: <6q1yvkvb37.fsf@abnoba.intevation.de> Craig McFarland writes: > Any pointers to a binary distribution of PIL 1.1.1 for Win NT? The PIDDLE maintainer Christoher Lee has built one: http://piddle.sourceforge.net/downloads/PIL-1.1.1-win32-py152-patched.zip In our experience with MapIt it works very well and even contains a fix for the plugin import bug. Bernhard -- Intevation GmbH http://intevation.de/ MapIt! http://mapit.de/ Sketch http://sketch.sourceforge.net/ From mmiller3@iupui.edu Thu Dec 7 16:23:36 2000 From: mmiller3@iupui.edu (Michael A. Miller) Date: 07 Dec 2000 11:23:36 -0500 Subject: [Image-SIG] question and bug? In-Reply-To: Mike Coleman's message of "06 Dec 2000 19:12:46 -0600" References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> Message-ID: <87ofyoryif.fsf@lumen.med.iupui.edu> >>>>> "Mike" == Mike Coleman writes: > The latter sounds closer to what I'd like to do (the > function is a messy function from X,Y to X0,Y0), but I > don't see how to get pixel data in and out of an Image > (aside from saving it to a file). I've read the doc, but > maybe I missed it. How can I just manipulate pixel values > directly, one by one? Something like this will do it... import Numeric import Image w = 256 h = 256 im = Image.new('P',(w,h)) for i in range(w): for j in range(h): im.putpixel( (i,j), some_function(i,j) ) im.show() Hope that helps, Mike -- Michael A. Miller mmiller3@iupui.edu Krannert Institute of Cardiology, IU School of Medicine Indiana Center for Vascular Biology and Medicine From rob@hooft.net Thu Dec 7 17:15:33 2000 From: rob@hooft.net (Rob W. W. Hooft) Date: Thu, 7 Dec 2000 18:15:33 +0100 Subject: [Image-SIG] question and bug? In-Reply-To: <20001207.1570200@cricket.> References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> <20001207.1570200@cricket.> Message-ID: <14895.50613.764063.186227@temoleh.chem.uu.nl> NB> array(im.getdata(), typecode=Int) Isn't that much slower than Numeric.fromstring(image.tostring())? Rob -- ===== rob@hooft.net http://www.hooft.net/people/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! ========= From nick@nickbower.com Thu Dec 7 17:18:16 2000 From: nick@nickbower.com (Nick Bower) Date: Thu, 07 Dec 2000 17:18:16 GMT Subject: [Image-SIG] question and bug? In-Reply-To: <87ofyoryif.fsf@lumen.med.iupui.edu> References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> <87ofyoryif.fsf@lumen.med.iupui.edu> Message-ID: <20001207.17181600@cricket.> > import Numeric > import Image > w =3D 256 > h =3D 256 > im =3D Image.new('P',(w,h)) > for i in range(w): > for j in range(h): > im.putpixel( (i,j), some_function(i,j) ) > im.show() this doesn't seem sensible to me at all. after using numeric arrays to = do the "some_function", im.putdata(numeric_array.flat) would surely be=20 better, as seen in my earlier post. nested for loops and individual putpixel's at the python level would be = much slower than taking advantage of something like putdata which=20 implements the for loop at the C level. yeah? nick From nick@nickbower.com Thu Dec 7 17:21:48 2000 From: nick@nickbower.com (Nick Bower) Date: Thu, 07 Dec 2000 17:21:48 GMT Subject: [Image-SIG] question and bug? In-Reply-To: <14895.50613.764063.186227@temoleh.chem.uu.nl> References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> <20001207.1570200@cricket.> <14895.50613.764063.186227@temoleh.chem.uu.nl> Message-ID: <20001207.17214800@cricket.> NB>> array(im.getdata(), typecode=3DInt) Rob> Isn't that much slower than Numeric.fromstring(image.tostring())? are you sure about that? i actually asked this question some time back = on the numeric group, whether getdata was faster/slower than fromstring,= =20 but there was no reply. i'm interested to know if it's really true=20 because i'll start using it instead. :) wouldn't mind knowing why either. From mcoleman2@kc.rr.com Fri Dec 8 01:39:50 2000 From: mcoleman2@kc.rr.com (Mike Coleman) Date: 07 Dec 2000 19:39:50 -0600 Subject: [Image-SIG] question and bug? In-Reply-To: mmiller3@iupui.edu's message of "07 Dec 2000 11:23:36 -0500" References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> <87ofyoryif.fsf@lumen.med.iupui.edu> Message-ID: <871yvjzo61.fsf@subterfugue.org> mmiller3@iupui.edu (Michael A. Miller) writes: > im.putpixel( (i,j), some_function(i,j) ) Ack, that's what I was missing. This function 'putpixel' isn't documented (I guess I could have read the source). Thanks! --Mike -- [O]ne of the features of the Internet [...] is that small groups of people can greatly disturb large organizations. --Charles C. Mann From fredrik@pythonware.com Fri Dec 8 17:03:40 2000 From: fredrik@pythonware.com (Fredrik Lundh) Date: Fri, 8 Dec 2000 18:03:40 +0100 Subject: [Image-SIG] question and bug? References: <3A2E7DC5.F02E45F3@cyberoptics.com><87zoi9yqy9.fsf@subterfugue.org> <87ofyoryif.fsf@lumen.med.iupui.edu> <871yvjzo61.fsf@subterfugue.org> Message-ID: <016901c06138$d1080340$0900a8c0@SPIFF> mike wrote: > > im.putpixel( (i,j), some_function(i,j) ) > > Ack, that's what I was missing. This function 'putpixel' isn't documented putpixel is a method of the Image class, and it's documented along with all other methods for that class: http://www.pythonware.com/library/pil/handbook/image.htm (also see nick bower's post) as other have pointed out, it's much more efficient to do "bulk updates" via putdata and/or fromstring... (to update a subregion, you can create a new image and paste it into the original). From mcoleman2@kc.rr.com Fri Dec 8 19:18:09 2000 From: mcoleman2@kc.rr.com (Mike Coleman) Date: 08 Dec 2000 13:18:09 -0600 Subject: [Image-SIG] question and bug? In-Reply-To: "Fredrik Lundh"'s message of "Fri, 8 Dec 2000 18:03:40 +0100" References: <3A2E7DC5.F02E45F3@cyberoptics.com> <87zoi9yqy9.fsf@subterfugue.org> <87ofyoryif.fsf@lumen.med.iupui.edu> <871yvjzo61.fsf@subterfugue.org> <016901c06138$d1080340$0900a8c0@SPIFF> Message-ID: <87vgsug1se.fsf@subterfugue.org> "Fredrik Lundh" writes: > > Ack, that's what I was missing. This function 'putpixel' isn't documented > > putpixel is a method of the Image class, and it's documented > along with all other methods for that class: > > http://www.pythonware.com/library/pil/handbook/image.htm I was looking at the Handbook available on this page, which seemed to be the only obvious available documentation. http://www.python.org/sigs/image-sig/Imaging.html It'd be a help to PIL newbies like me if out-of-date docs got zapped, or at least clearly marked as obsolete. > as other have pointed out, it's much more efficient to do "bulk > updates" via putdata and/or fromstring... (to update a subregion, > you can create a new image and paste it into the original). I get it, thanks. --Mike -- [O]ne of the features of the Internet [...] is that small groups of people can greatly disturb large organizations. --Charles C. Mann From Luc Tonin" hi I m trying to insert some text into an Image ( a gif for exemple) i m using PIL but i don t know how to do perhaps by using da PSDraw class but when i use the setfont command i always received a Attribute error : isofont on this function Could somebody help me ? thx by advance Luc TONIN ------------------------------ WebDevelopper ------------------------------ From sandrine.pascaud@syseca.thomson-csf.com Fri Dec 15 14:47:31 2000 From: sandrine.pascaud@syseca.thomson-csf.com (sandrine pascaud) Date: Fri, 15 Dec 2000 15:47:31 +0100 Subject: [Image-SIG] Python-icones Message-ID: <3A3A2F03.69F56C3B@syseca.thomson-csf.com> Is there somebody to explain me how to put an icon (small image in gif format or any other if required) in the window border (Window Manager border). Is it possible ? Is it possible to disable the "close" button in the WM border too ? Thanks Sandrine Pascaud From rob@hooft.net Mon Dec 18 07:53:19 2000 From: rob@hooft.net (Rob W. W. Hooft) Date: Mon, 18 Dec 2000 08:53:19 +0100 Subject: [Image-SIG] Python-icones In-Reply-To: <3A3A2F03.69F56C3B@syseca.thomson-csf.com> References: <3A3A2F03.69F56C3B@syseca.thomson-csf.com> Message-ID: <14909.49775.121995.578645@temoleh.chem.uu.nl> >>>>> "sp" == sandrine pascaud writes: sp> Is there somebody to explain me how to put an icon (small image sp> in gif format or any other if required) in the window border sp> (Window Manager border). Is it possible ? Is it possible to sp> disable the "close" button in the WM border too ? These are functions that are part of the task of the Window Manager. The answer will be different for different window managers. Some Window Managers can be extended in python, and in such cases PIL might help you to get an icon in the window border. Please refer to the WM documentation for the WM that you are using for help. Rob -- ===== rob@hooft.net http://www.hooft.net/people/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! ========= From Luc Tonin" does anyone know how i could do to send mail attachments in python ? thx by advance Luc Luc TONIN ------------------------------ Développeur Web ------------------------------ Multithématiques http://www.multithematiques.com Chaines thématiques sur câble et satellite Canal Jimmy, Cinecinemas, Cineclassics, Planete, Forum, Season, Wishline, Centre Jean Monet 03 82 24 00 42 Longlaville +333 82 24 00 42 54400 Longwy From jmcgraw@databill.com Mon Dec 18 15:34:19 2000 From: jmcgraw@databill.com (Joel Mc Graw) Date: Mon, 18 Dec 2000 08:34:19 -0700 Subject: [Image-SIG] mail attachments In-Reply-To: <002f01c068fd$2e978370$6200a8c0@longwy> Message-ID: <4.3.1.1.20001218083301.00b4e4f0@10.0.0.5> At 03:16 PM 12/18/00 +0100, Luc Tonin wrote: >does anyone know how i could do to send mail attachments in python ? >thx by advance > Luc Hello Luc, http://www.methods.co.nz/python/ Follow the link to "mailfiles"--it's a handy little program that should do just what you need. Joel Mc Graw DataBill, LLC Phone: 602-415-1234 FAX: 602-415-1255 Email: jmcgraw@databill.com ICQ: 45234166 --------------------------- BSD: Linux for adults From s_rowley@hotmail.com Mon Dec 18 18:59:09 2000 From: s_rowley@hotmail.com (Stephen Rowley) Date: Mon, 18 Dec 2000 18:59:09 -0000 Subject: [Image-SIG] has anyone gotten python 2.0 and pil for windows 98 to work?? Message-ID: hey were can i get pil for python 2.0 for Windows 98 can't find any with a project file for ms visual c++ pythonware has python 1.5.2 that includes pil. but i'd really like to use python 2.0. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com From Les Schaffer Mon Dec 18 19:24:19 2000 From: Les Schaffer (Les Schaffer) Date: Mon, 18 Dec 2000 14:24:19 -0500 (EST) Subject: [Image-SIG] has anyone gotten python 2.0 and pil for windows 98 to work?? In-Reply-To: References: Message-ID: <14910.25699.638588.857592@optonline.net> Stephen Rowley said: > hey were can i get pil for python 2.0 for Windows 98 can't find any > with a project file for ms visual c++ i'm workin on a project file now. have everything compiled and just need to deal with some issues linking to zlib. if you want jpeg support, there is a minor correction needed for the jpeg headers as well. when i get it done, i will be more than happy to share with all interested, as it seems crazy that no .dsw exists to date. les schaffer From fredrik@pythonware.com Tue Dec 19 08:32:19 2000 From: fredrik@pythonware.com (Fredrik Lundh) Date: Tue, 19 Dec 2000 09:32:19 +0100 Subject: [Image-SIG] has anyone gotten python 2.0 and pil for windows 98 to work?? References: Message-ID: <003301c06996$342932e0$0900a8c0@SPIFF> Stephen Rowley wrote: > hey were can i get pil for python 2.0 for Windows 98 > can't find any with a project file for ms visual c++ > > pythonware has python 1.5.2 that includes pil. but i'd really like to use > python 2.0. the binaries at http://effbot.org/pil/ should work on win9x, NT, and 2K. From jonathan.gilligan@vanderbilt.edu Tue Dec 19 12:34:34 2000 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Tue, 19 Dec 2000 06:34:34 -0600 Subject: [Image-SIG] VC++ 6.0 project files for PIL 1.1 In-Reply-To: <14910.25699.638588.857592@optonline.net> References: Message-ID: <5.0.2.1.0.20001219062837.02b830e0@g.mail.vanderbilt.edu> --=====================_40843234==_ Content-Type: text/plain; charset="us-ascii"; format=flowed Here are my project files for PIL 1.1 under VC++ 6.0, in case it's any help to anyone. You will have to edit the paths for include and library files (in Projects/Settings or in Tools/Options/Directories) to point to your copies of zlib, libjpeg, tcl, tk, and python. Adapting these for PIL 1.1.1 or 1.2 should not be too terrible. Also, I posted detailed instructions for compiling PIL under Windows to this list on 19 September. You can search the archive. Jonathan --=====================_40843234==_ Content-Type: text/plain; charset="us-ascii" # Microsoft Developer Studio Project File - Name="ImagingTk" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=ImagingTk - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "ImagingTk.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "ImagingTk.mak" CFG="ImagingTk - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "ImagingTk - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "ImagingTk - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "ImagingTk - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ImagingTk___Win32_Release" # PROP BASE Intermediate_Dir "ImagingTk___Win32_Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "ImagingTk___Win32_Release" # PROP Intermediate_Dir "ImagingTk___Win32_Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGINGTK_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "d:\programming\utility libs\jpeg\jpeg-6b" /I "libimaging" /I "d:\programming\utility libs\zlib113" /I "e:\program files\tcl\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGINGTK_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib tcl83.lib tk83.lib python20.lib /nologo /dll /machine:I386 /out:"ImagingTk___Win32_Release/_imagingTk.dll" /libpath:"d:\programming\utility libs\jpeg\jpeg-6b\release" /libpath:"d:\programming\python\python\dist\src\PCBuild" /libpath:"e:\program files\tcl\lib" !ELSEIF "$(CFG)" == "ImagingTk - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ImagingTk___Win32_Debug" # PROP BASE Intermediate_Dir "ImagingTk___Win32_Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "ImagingTk___Win32_Debug" # PROP Intermediate_Dir "ImagingTk___Win32_Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGINGTK_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGINGTK_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "ImagingTk - Win32 Release" # Name "ImagingTk - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\_imagingtk.c # End Source File # Begin Source File SOURCE=.\Tk\tkImaging.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project --=====================_40843234==_ Content-Type: text/plain; charset="us-ascii" Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "Imaging"=".\Imaging.dsp" - Package Owner=<4> Package=<5> {{{ begin source code control Imaging . end source code control }}} Package=<4> {{{ }}} ############################################################################### Project: "ImagingTk"=".\ImagingTk.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### --=====================_40843234==_ Content-Type: text/plain; charset="us-ascii" # Microsoft Developer Studio Project File - Name="Imaging" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=Imaging - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "Imaging.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "Imaging.mak" CFG="Imaging - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "Imaging - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "Imaging - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "Imaging" # PROP Scc_LocalPath "." CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "Imaging - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGING_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "d:\programming\utility libs\jpeg\jpeg-6b" /I "libimaging" /I "d:\programming\utility libs\zlib113" /I "e:\program files\tcl\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGING_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib jpeg.lib python20.lib zlibstat.lib tcl83.lib tk83.lib /nologo /dll /machine:I386 /out:"Release/_imaging.dll" /libpath:"d:\programming\utility libs\jpeg\jpeg-6b\release" /libpath:"d:\programming\python\python\dist\src\PCBuild" /libpath:"e:\program files\tcl\lib" /libpath:"d:\programming\utility libs\zlib113\Static" !ELSEIF "$(CFG)" == "Imaging - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGING_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMAGING_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "Imaging - Win32 Release" # Name "Imaging - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\_imaging.c # End Source File # Begin Source File SOURCE=.\libImaging\Access.c # End Source File # Begin Source File SOURCE=.\libImaging\Bands.c # End Source File # Begin Source File SOURCE=.\libImaging\BitDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\Blend.c # End Source File # Begin Source File SOURCE=.\libImaging\Chops.c # End Source File # Begin Source File SOURCE=.\libImaging\Convert.c # End Source File # Begin Source File SOURCE=.\libImaging\ConvertYCbCr.c # End Source File # Begin Source File SOURCE=.\libImaging\Copy.c # End Source File # Begin Source File SOURCE=.\libImaging\Crc32.c # End Source File # Begin Source File SOURCE=.\libImaging\Crop.c # End Source File # Begin Source File SOURCE=.\decode.c # End Source File # Begin Source File SOURCE=.\libImaging\Dib.c # End Source File # Begin Source File SOURCE=.\display.c # End Source File # Begin Source File SOURCE=.\libImaging\Draw.c # End Source File # Begin Source File SOURCE=.\libImaging\Effects.c # End Source File # Begin Source File SOURCE=.\encode.c # End Source File # Begin Source File SOURCE=.\libImaging\EpsEncode.c # End Source File # Begin Source File SOURCE=.\libImaging\File.c # End Source File # Begin Source File SOURCE=.\libImaging\Fill.c # End Source File # Begin Source File SOURCE=.\libImaging\Filter.c # End Source File # Begin Source File SOURCE=.\libImaging\FliDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\Geometry.c # End Source File # Begin Source File SOURCE=.\libImaging\GetBBox.c # End Source File # Begin Source File SOURCE=.\libImaging\GifDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\GifEncode.c # End Source File # Begin Source File SOURCE=.\libImaging\HexDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\Histo.c # End Source File # Begin Source File SOURCE=.\libImaging\JpegDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\JpegEncode.c # End Source File # Begin Source File SOURCE=.\libImaging\LzwDecode.c # End Source File # Begin Source File SOURCE=.\map.c # End Source File # Begin Source File SOURCE=.\libImaging\Matrix.c # End Source File # Begin Source File SOURCE=.\libImaging\MspDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\Negative.c # End Source File # Begin Source File SOURCE=.\libImaging\Offset.c # End Source File # Begin Source File SOURCE=.\outline.c # End Source File # Begin Source File SOURCE=.\libImaging\Pack.c # End Source File # Begin Source File SOURCE=.\libImaging\PackDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\Palette.c # End Source File # Begin Source File SOURCE=.\libImaging\Paste.c # End Source File # Begin Source File SOURCE=.\path.c # End Source File # Begin Source File SOURCE=.\libImaging\PcdDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\PcxDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\PcxEncode.c # End Source File # Begin Source File SOURCE=.\libImaging\Point.c # End Source File # Begin Source File SOURCE=.\libImaging\Quant.c # End Source File # Begin Source File SOURCE=.\libImaging\QuantHash.c # End Source File # Begin Source File SOURCE=.\libImaging\QuantHeap.c # End Source File # Begin Source File SOURCE=.\libImaging\RawDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\RawEncode.c # End Source File # Begin Source File SOURCE=.\libImaging\Storage.c # End Source File # Begin Source File SOURCE=.\libImaging\SunRleDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\TgaRleDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\Unpack.c # End Source File # Begin Source File SOURCE=.\libImaging\UnpackYCC.c # End Source File # Begin Source File SOURCE=.\libImaging\XbmDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\XbmEncode.c # End Source File # Begin Source File SOURCE=.\libImaging\ZipDecode.c # End Source File # Begin Source File SOURCE=.\libImaging\ZipEncode.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\libImaging\Bit.h # End Source File # Begin Source File SOURCE=.\libImaging\Gif.h # End Source File # Begin Source File SOURCE=.\libImaging\Imaging.h # End Source File # Begin Source File SOURCE=.\libImaging\ImConfig.h # End Source File # Begin Source File SOURCE=.\libImaging\ImDib.h # End Source File # Begin Source File SOURCE=.\libImaging\ImPlatform.h # End Source File # Begin Source File SOURCE=.\libImaging\Jpeg.h # End Source File # Begin Source File SOURCE=.\libImaging\Lzw.h # End Source File # Begin Source File SOURCE=.\libImaging\Quant.h # End Source File # Begin Source File SOURCE=.\libImaging\QuantDefines.h # End Source File # Begin Source File SOURCE=.\libImaging\QuantHash.h # End Source File # Begin Source File SOURCE=.\libImaging\QuantHeap.h # End Source File # Begin Source File SOURCE=.\libImaging\QuantTypes.h # End Source File # Begin Source File SOURCE=.\libImaging\Raw.h # End Source File # Begin Source File SOURCE=.\libImaging\Zip.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project --=====================_40843234==_ Content-Type: text/plain; charset="us-ascii"; format=flowed =========================================================================== Jonathan M. Gilligan --=====================_40843234==_-- From jonathan.gilligan@vanderbilt.edu Tue Dec 19 14:12:33 2000 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Tue, 19 Dec 2000 08:12:33 -0600 Subject: [Image-SIG] VC++ 6.0 project files for PIL 1.1 In-Reply-To: <5.0.2.1.0.20001219062837.02b830e0@g.mail.vanderbilt.edu> References: <14910.25699.638588.857592@optonline.net> Message-ID: <5.0.2.1.0.20001219080454.030518e0@g.mail.vanderbilt.edu> Oops. I had my mailer misconfigured to include attachments in the body of the message, so all three project files were joined together in my last post. Apologies to all for my incompetence. If anyone wants to use the files, save everything from the line > # Microsoft Developer Studio Project File - Name="ImagingTk" - Package Owner=<4> through the first instance of > # End Project as "ImagingTk.dsp". Then save everything from the line > Microsoft Developer Studio Workspace File, Format Version 6.00 through the line just before > # Microsoft Developer Studio Project File - Name="Imaging" - Package Owner=<4> as "Imaging.dsw". Finally, save everything beginning with the line > # Microsoft Developer Studio Project File - Name="Imaging" - Package Owner=<4> through the line > # End Project as "Imaging.dsp". If people want, I can repost this message with the files correctly attached as MIME attachments, but I will hold off for now, since I don't want to pollute the bandwidth. Jonathan At 06:34 AM 12/19/2000, Jonathan M. Gilligan wrote: >Here are my project files for PIL 1.1 under VC++ 6.0, in case it's any >help to anyone. You will have to edit the paths for include and library >files (in Projects/Settings or in Tools/Options/Directories) to point to >your copies of zlib, libjpeg, tcl, tk, and python. Adapting these for PIL >1.1.1 or 1.2 should not be too terrible. =========================================================================== Jonathan M. Gilligan From borrini@libero.it Wed Dec 20 17:20:15 2000 From: borrini@libero.it (Giulio) Date: Wed, 20 Dec 2000 18:20:15 +0100 Subject: [Image-SIG] Image Resize Problem Message-ID: <002501c06aa9$1eaf5c00$01c8a8c0@it.tin.it> Hi guys, this is my first message.. I've a problem with the resize of a jpeg. The original image is very big with a resolution of 150 pixel per inch. I use this to resize: _______________________________________________ pip = pip.resize((dimenx,dimeny),Image.BICUBIC) enhancer = ImageEnhance.Sharpness(pip) pip = enhancer.enhance(fact) _______________________________________________ The problem is that the resulting image is very bad (i can see the pixel or is too blur depending of "fact" ) quality and have a resolution of 72 pixel per inch. How can i manain the original resolution and have a good quality even on image of 1/10 size of the original??? Thanks in advance. Regards Giulio Borrini Web Programmer Netbuilder Snc From Les Schaffer Wed Dec 20 19:29:10 2000 From: Les Schaffer (Les Schaffer) Date: Wed, 20 Dec 2000 14:29:10 -0500 (EST) Subject: [Image-SIG] VC++ Workspace and DLLs for PIL/Py2.0 Message-ID: <14913.2182.130740.691807@optonline.net> I have uploaded a couple packages for compiling PIL (Imaging-1.1.1) with Python 2.0 to: http://folks.astrian.net/godzilla/imaging_20_dlls.zip http://folks.astrian.net/godzilla/imaging_20_no_dlls.zip The zip files include a a MS VC++ workspace file and a pair of VC++ project files for building _imaging.dll and _imagingtk.dll. The packages also include all the header file you need to use zlib, tk, and jpeg, the latter of which needed some minor changes. Only one PIL file, ImPlatform.h, needed slight modification in order to compile. One of the packages also includes compiled versions of the two imaging DLLs and also includes all the libs and DLLs needed for using tk/zlib/jpeg. [ i assume i havent broken any rules by distributing these files. if so let me know and i will learn the rules fast.] To use, simply unpack the PIL package from pythonware into your Python directory and then unpack one of these two zip files into the the very same python directory. Be sure to let ImPlatform.h be overwritten. The workspace file lives in [your python root]\Imaging-1.1.1\PILBuild Let me know if there are problems using these packages. les schaffer p.s. come to think of it, these files should work with Python 1.5.2 as well, but i haven't tried. If anyone does and succeeds, please let me know. Thanks. From jessw@ritchie.loop.com Wed Dec 20 14:24:56 2000 From: jessw@ritchie.loop.com (Jesse W) Date: Wed, 20 Dec 2000 14:24:56 +0000 Subject: [Image-SIG] Gif transparencies Message-ID: <200012202227.OAA13598@stevie.loop.com> How does the transparency support work for Gif files using Pil? I am making a card game, and I need to display some pictures of cards in Tkinter. The card images have a little border arround them, and I wish to make it trasparent so I can overlap the images cleanly. I looked in the handbook and searched the website, but I only came up with hints about having a 'transparency' attribute in the info dictionary. I think I just need to assign something(maybe a palette number(whatever that is)) to the transparency attribute of the image's info dictionary, but I dont' know how to do that or what exactly that is. Does anyone have any help with this? Thank you for your time, Jesse W From nick@nickbower.com Tue Dec 26 15:39:09 2000 From: nick@nickbower.com (Nick Bower) Date: Tue, 26 Dec 2000 15:39:09 GMT Subject: [Image-SIG] PSDraw Error Message-ID: <20001226.15390900@cricket.> This doesn't produce recognizable output to ghostscript. It's straight = out of the PIL manual. The "image" method is not mentioned in PSDraw=20 documentation btw. im =3D Image.open('bahamas.gif').convert('L') box =3D (1*72, 2*72, 7*72, 10*72) outfp =3D open('bahamas.ps','w') ps =3D PSDraw.PSDraw(outfp) ps.begin_document() ps.image(box,im,72) ps.rectangle(box) ps.end_document() The gs error is "Error: /undefined in gsize". BTW - Is there any way to control the bounding box with just a straight = im.save('image.eps')? Cheers, nick. From tparker@amsuk.com Tue Dec 26 17:10:14 2000 From: tparker@amsuk.com (tparker@amsuk.com) Date: Tue, 26 Dec 2000 17:10:14 +0000 Subject: [Image-SIG] Autoreply: Image-SIG digest, Vol 1 #367 - 1 msg Message-ID: I am away from the Office from 20th December until 28th December. If you have any queries please email helpdesk@amsuk.com. _____________________________________________________________________ This message has been checked for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. For further information visit http://www.uk.uu.net/products/security/virus/ From tparker@amsuk.com Wed Dec 27 17:28:07 2000 From: tparker@amsuk.com (tparker@amsuk.com) Date: Wed, 27 Dec 2000 17:28:07 +0000 Subject: [Image-SIG] Autoreply: Image-SIG digest, Vol 1 #368 - 1 msg Message-ID: I am away from the Office from 20th December until 28th December. If you have any queries please email helpdesk@amsuk.com. _____________________________________________________________________ This message has been checked for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. For further information visit http://www.uk.uu.net/products/security/virus/