From fredrik@pythonware.com Fri Sep 1 11:06:38 2000 From: fredrik@pythonware.com (Fredrik Lundh) Date: Fri, 1 Sep 2000 12:06:38 +0200 Subject: [Image-SIG] tif file save problem References: <4.1.20000831090038.00c67de0@parrot.grc.nasa.gov> <4.1.20000831103715.00c669a0@parrot.grc.nasa.gov> Message-ID: <016001c013fc$51f0dd40$0900a8c0@SPIFF> robert wrote: > That indeed does the trick. Thanks much! The funny thing about it was that > it didn't do it with any other image files except the ones that PIL saved. that's entirely by accident... PIL uses memory mapping on certain uncompressed formats (where the layout on disk happens to match any image memory layout supported by PIL). Mapped formats include TIFF, BMP, PPM, and IM. > Another question for you. What are new features of PIL 1.1 compared to 1.0? > Is there a ducument somewhere that lists this? PIL 1.1 is basically a maintenance release. Here's an excerpt from the CHANGES file: *** Changes from release 1.0 to 1.1 *** + Adapted to Python 1.6 ("append" and other method changes) + Fixed Image.paste when pasting with solid colour and matte layers ("L" or "RGBA" masks) (bug reported by Robert Kern) + To make it easier to distribute prebuilt versions of PIL, the tkinit binding stuff has been moved to a separate extension module, named "_imagingtk". ... cheers /F From nick@nickbower.com Fri Sep 1 11:33:10 2000 From: nick@nickbower.com (nick@nickbower.com) Date: Fri, 01 Sep 2000 10:33:10 GMT Subject: [Image-SIG] Putdata in RGB mode? Message-ID: <20000901.10331000@cricket.> Does anyone know why I can't put data into a 24-bit image? im =3D open('blah.jpg') im2 =3D new('RGB', (im.size[0], im.size[1])) im2.putdata(im.getdata()) Traceback (innermost last): File "", line 1, in ? File "/usr/lib/python1.5/site-packages/PIL/Image.py", line 602, in=20 putdata self.im.putdata(data, scale, offset) TypeError: unrecognized image mode Thanks, Nick. From kjohnston@rcsi.ie Mon Sep 4 10:21:22 2000 From: kjohnston@rcsi.ie (Catriona Johnston) Date: Mon, 4 Sep 2000 10:21:22 +0100 Subject: [Image-SIG] Python Magick Message-ID: <9921C1171939D3119D860090278AECA2DEC6A0@EXCHANGE> Hi all, I was looking for a copy of PythonMagick but I cannot find an active link to the module. Does anyone have an address of an active site or a copy they can e-mail me? Cheers, Kate From rfalck@home.com Fri Sep 8 21:35:57 2000 From: rfalck@home.com (Rick Falck) Date: Fri, 08 Sep 2000 13:35:57 -0700 Subject: [Image-SIG] Python and DirectX... Message-ID: <39B94DAD.B15E0223@home.com> Hi, Do you know if anyone has wrapped up DirectX in Python yet? Thanks for any help Rick Falck Software Engineer From vic@k-creations.com Fri Sep 8 11:13:56 2000 From: vic@k-creations.com (vic@k-creations.com) Date: Fri, 8 Sep 2000 05:13:56 -0500 Subject: [Image-SIG] GeoTIFF? Message-ID: <39B87594.8068.81967E@localhost> Hello Everyone, I've been pythoning for over a year now, but haven't used PIL until just recently. I have a question -- has anyone successfully used GeoTIFF with PIL? I have tried to read .tif files for USGS DRGs, which are GeoTIFF, but they don't work properly: r>>> ima=Image.open('d:\\data\\python\\src\\drg\\test.tif') >>> print ima.format,ima.size,ima.mode TIFF (5419, 6804) P >>> ima.show() Traceback (innermost last): File "", line 1, in ? ima.show() File "C:\Program Files\Python\Lib\Pil\Image.py", line 694, in show _showxv(self, title, command) File "C:\Program Files\Python\Lib\Pil\Image.py", line 972, in _showxv file = self.convert(base)._dump(format=format) File "C:\Program Files\Python\Lib\Pil\Image.py", line 415, in convert im = self.im.convert(mode, dither) MemoryError: [NOTE: Same thing happens in Linux-Mandrake 7.1] Any ideas? I know that GeoTIFF adds some attributes to the TIFF file, so that may be breaking it. THANKS for any advice. Vic Kelson From kuncej@mail.conservation.state.mo.us Mon Sep 11 20:00:31 2000 From: kuncej@mail.conservation.state.mo.us (Jeffrey Kunce) Date: Mon, 11 Sep 2000 14:00:31 -0500 Subject: [Image-SIG] GeoTIFF? Message-ID: >I have a question -- has anyone successfully used=20 >GeoTIFF with PIL? I have tried to read .tif files for USGS DRGs,=20 >which are GeoTIFF, but they don't work properly: I am able to open and show() a USGS DRG with PIL 1.0=20 on NT, but the show() method uses a huge amount of=20 memory and takes a very long time. It appears to convert=20 the whole image to a .BMP and save it in a temporary file before trying to display it. I expect that you are just running=20 out memory. Have you tried something like this: ima=3DImage.open('d:\\data\\python\\src\\drg\\test.tif') print ima.format,ima.size,ima.mode imb =3D ima.crop((1000,1000,1640,1640)) imb.show() If you can show() the smaller image, then PIL is reading and manipulating the image file OK. --Jeff From michaell@collegenet.com Tue Sep 12 01:40:03 2000 From: michaell@collegenet.com (Michael Lee) Date: Mon, 11 Sep 2000 17:40:03 -0700 Subject: [Image-SIG] PIL and tiff support Message-ID: <39BD7B63.D1C62C49@collegenet.com> I'm using PIL to manipulate tiff fax images. im = Image.open("file.tif") Does successfully open the image. I can even get at the nifty tags with im.tag[] But, I can't do anything with the image. I keep getting the message: IOError: decoder group4 not available I'm running a debian system and have been using the standard packages. I just removed those packages and rebuilt PIL myself from source and I still get the same error. Am I missing something or is there really a problem with tiff support in PIL? Thanks, Michael Lee From srichter@cbu.edu Tue Sep 12 03:21:11 2000 From: srichter@cbu.edu (Stephan Richter) Date: Mon, 11 Sep 2000 21:21:11 -0500 Subject: [Image-SIG] PIL and tiff support In-Reply-To: <39BD7B63.D1C62C49@collegenet.com> Message-ID: <4.3.1.0.20000911211714.00ba2770@198.78.130.6> >Am I missing something or is there really a problem with tiff support in >PIL? PIL does not support GROUP 3 and 4 type TIFF Images. It was brought up many on the list and a wanted feature of PIL. Here is what I am doing: There are plenty of TIFF conversion programs that will convert it to regular encoded TIFF image. Then you will be able to read it with PIL. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management From Anthony Baxter Thu Sep 14 00:21:30 2000 From: Anthony Baxter (Anthony Baxter) Date: Wed, 13 Sep 2000 23:21:30 +0000 Subject: [Image-SIG] PIL and tiff support In-Reply-To: Message from Stephan Richter of "Mon, 11 Sep 2000 21:21:11 EST." <4.3.1.0.20000911211714.00ba2770@198.78.130.6> Message-ID: <200009132321.KAA05512@mbuna.arbhome.com.au> >>> Stephan Richter wrote > PIL does not support GROUP 3 and 4 type TIFF Images. It was brought up many > on the list and a wanted feature of PIL. > Here is what I am doing: There are plenty of TIFF conversion programs that > will convert it to regular encoded TIFF image. Then you will be able to > read it with PIL. Just be careful - it seems that a number of packages and systems out there claim all sorts of tiff support that they don't actually really have (at least, not entirely correctly). In particular, fax applications such as the cisco fax support are _really_ bloody picky. Anthony -- Anthony Baxter It's never too late to have a happy childhood. From srichter@cbu.edu Wed Sep 13 15:07:56 2000 From: srichter@cbu.edu (Stephan Richter) Date: Wed, 13 Sep 2000 09:07:56 -0500 Subject: [Image-SIG] PIL and tiff support In-Reply-To: <200009132321.KAA05512@mbuna.arbhome.com.au> References: <4.3.1.0.20000911211714.00ba2770@198.78.130.6> Message-ID: <4.3.1.0.20000913090457.00bad310@198.78.130.6> >Just be careful - it seems that a number of packages and systems out >there claim all sorts of tiff support that they don't actually really >have (at least, not entirely correctly). In particular, fax applications >such as the cisco fax support are _really_ bloody picky. I just used a couple that come standard with linux, such as tiffcp, which use the libtiff. All these tools are very fast and work without any troubles. I use it even on a production server to serve up snapshot of huge 16000x12000 pixels size plans. Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management From Moodie.Craig.CA@bhp.com Thu Sep 14 02:41:38 2000 From: Moodie.Craig.CA@bhp.com (Moodie, Craig CA) Date: Thu, 14 Sep 2000 12:41:38 +1100 Subject: [Image-SIG] FW: PIL-------pilconvert.py Message-ID: Folks, > I downloaded the PIL from the Python download site .The downloaded file was pil-win32-991101.zip. > I unzipped the file and place the contents of the directory py152 directly in the python directory ie to avoid updating the PYTHONPATH via the > regedit.exe Windows registry. > Python > PIL > Scripts > etc > I am running Python 1.52 on a Windows 95 m/c. > I want to convert a .tif file to a .jpg so I typed ---at the Scripts directory:- > python pilconvert.py imagef.tif imagef.jpg > This resulted in : > cannot convert image(exceptions.Importerror:The _imaging C module is not installed) > This looks like there is something missing in the installation? > The code did create a empty file called imagef.jpg in the Scripts directory. > I have downloaded your documentation of PIL version 0.2b3. This was the only docos I could locate readily. > Can you point me at what is wrong and/or missing? > regards > Craig > > > > EOM NOTICE - This message contains information intended only for the use of the addressee named above. It may also be confidential and/or privileged. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@bhp.com. From Moodie.Craig.CA@bhp.com Fri Sep 15 02:00:35 2000 From: Moodie.Craig.CA@bhp.com (Moodie, Craig CA) Date: Fri, 15 Sep 2000 12:00:35 +1100 Subject: [Image-SIG] Converting TIFF to JPEG Message-ID: Hi The following are outputs are from my routine myconvert_jpeg.py--- listed below. The first output is when I activate(deactivate the im.save line) the print line to establish that the file has been recognised and its format detail. This works! C:\>python c:\progra~1\python\Scripts\myconvert_jpeg.py c:\progra~1\python\Scripts\image12194.tif c:\progra~1\python\Scripts\image12194.tif TIFF 853x603 P # myconvert_jpeg.py # # The Python Imaging Library. # developed by Frerik Lundh # convert image files # to JPEG files # usage is myconvert_jpeg.py imagefile.* # creates imagefile.jpg-----hopefully import os, sys import Image for infile in sys.argv[1:]: outfile=os.path.splitext(infile)[0]+".jpg" im=Image.open(infile) # print infile,im.format,"%dx%d" % im.size,im.mode im.save(outfile,"JPEG") The second output is the result of when I try to save the tif file as a jpeg file. C:\>python c:\progra~1\python\Scripts\myconvert_jpeg.py c:\progra~1\python\Scripts\image12194.tif Traceback (innermost last): File "c:\progra~1\python\Scripts\myconvert_jpeg.py", line 19, in ? im.save(outfile,"JPEG") File "C:\PROGRAM FILES\PYTHON\PIL\Image.py", line 655, in save self.load() File "C:\PROGRAM FILES\PYTHON\PIL\ImageFile.py", line 125, in load self.load_prepare() File "C:\PROGRAM FILES\PYTHON\PIL\ImageFile.py", line 175, in load_prepare self.im = Image.core.new(self.mode, self.size) File "C:\PROGRAM FILES\PYTHON\PIL\Image.py", line 40, in __getattr__ raise ImportError, "The _imaging C module is not installed" ImportError: The _imaging C module is not installed Can anybody tell me what is wrong? I have run the viewer.py script(comes with PIL) with this file and it works! Incidentally this last message is the same as when you run pilconvert.py(comes with PIL) Hopefully Craig EOM NOTICE - This message contains information intended only for the use of the addressee named above. It may also be confidential and/or privileged. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@bhp.com. From kcaza@cymbolic.com Sun Sep 17 20:28:32 2000 From: kcaza@cymbolic.com (kcaza@cymbolic.com) Date: Sun, 17 Sep 2000 12:28:32 -0700 Subject: [Image-SIG] File Resolution saving.... Message-ID: <8825695D.006B0E86.00@mail.cymbolic.com> A while back, I posted a message about how to save image resolution into the file. Since then, I've managed to 'hack' support for this into TIFF, EPS, PDF, PNG, and BMP file formats. Most of these are pretty straight forward, as this function is supported by the file format, but 'neglected' (or set to a default value) by PIL. The code below shows the addition to TiffImagePlugin that I had to make, and I'll forward the other hacks to Fred if he's supportive of adding this in the future. I find this a VERY necessary feature so that images are sized properly when printed by the user. As it is, everything usually defaults to 72 pixels/inch, and it's up to the user to manually resize images when they're printing them (if their printing application even supports this). I am having difficulty adding support for this to JPEG... I've looked at the IJG library, and it supports it with "density_unit", "X_density" and "Y_density", however I'm really not having any luck successfully passing this info to the encoder. Any help there would be appreciated! Thanks, Kevin Cazabon kcazabon@home.com # add this to line 568 of TiffImagePlugin.py ################################# # HACK to let the user specify X and Y Resolution Tags for saving # simply create an im.RES or (im.XRES, im.YRES) attribute, with the # pixels per inch that you wish before saving # # alternatively, if your image was loaded from a TIFF file, it will # preserve the original PPI of the file unless you specify an im.RES, # im.XRES, or im.YRES value. # by Kevin Cazabon, Sept 2000 kcazabon@home.com if ("XRES" in dir(im) and "YRES" in dir(im)) or "RES" in dir(im): if "RES" in dir(im): ifd[282] = int(im.RES + 0.5) # Tag 282 is for XRESOLUTION ifd[283] = int(im.RES + 0.5) # Tag 283 is for YRESOLUTION if "XRES" in dir(im): ifd[282] = int(im.XRES + 0.5) if "YRES" in dir(im): ifd[283] = int(im.YRES + 0.5) # Note that if you've done anything with the file after opening, the TIFF tag directory is lost # so the following won't work. #you can save the im.tag attribute when opening it, and re-attach it before saving if you like elif "tag" in dir(im): #meaning that it was loaded as a TIFF file already if im.tag.tagdata.has_key(282): ifd[282] = im.tag.tagdata.get(282) if im.tag.tagdata.has_key(283): ifd[283] = im.tag.tagdata.get(283) ################################# an example of usage would be: import Image # create a new image and specify the resolution im = Image.new("RGB", (100,100)) im.RES = 300 # meaning 300 pixels per inch im.save("c:/temp/test.tif") # or load an existing TIFF and preserve the existing resolution when saving im2 = Image.open("c:/temp/existing_400ppi_image.tif") im2.save("c:/temp/still_400ppi.tif") From Joshua.Brauer@colostate.edu Mon Sep 18 21:03:44 2000 From: Joshua.Brauer@colostate.edu (Joshua Brauer) Date: Mon, 18 Sep 2000 14:03:44 -0600 Subject: [Image-SIG] PIL Problem Message-ID: I've been trying to complie PIL on a newly rebuilt-box (Linux - RedHat 6.2 with my own python compile) The Compilition goes fine (with 1.0 or 1.1) but with both versions I get an error when I import _imageing saying that there is an error... It's the same error with 1.1 or 1.0 (the sample below is 1.0) Any ideas? Python 1.5.2 (#5, Sep 18 2000, 12:36:54) [GCC egcs-2.91.66 19990314/Linux (egcs- on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import _imaging Traceback (innermost last): File "", line 1, in ? ImportError: ./_imaging.so: undefined symbol: inflateInit_ >>> import Image (please CC me on responses!) Josh -- ------------------------------------------------- Joshua Brauer Computer Support Scientist Department of Biochemistry and Molecular Biology Colorado State University Fort Collins, CO 80523 (970) 491-1080/pager: (970) 498-7995, #5837 ------------------------------------------------- From akuchlin@mems-exchange.org Mon Sep 18 21:11:17 2000 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Mon, 18 Sep 2000 16:11:17 -0400 Subject: [Image-SIG] PIL Problem In-Reply-To: ; from Joshua.Brauer@colostate.edu on Mon, Sep 18, 2000 at 02:03:44PM -0600 References: Message-ID: <20000918161117.A15256@kronos.cnri.reston.va.us> On Mon, Sep 18, 2000 at 02:03:44PM -0600, Joshua Brauer wrote: >ImportError: ./_imaging.so: undefined symbol: inflateInit_ This symbol is from the zlib library. Is the _imaging module being linked with -lz? --amk From jonathan.gilligan@vanderbilt.edu Mon Sep 18 22:39:46 2000 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Mon, 18 Sep 2000 16:39:46 -0500 Subject: [Image-SIG] Building under Windows/Python 1.6 Message-ID: <5.0.0.25.0.20000918163746.02917a90@g.mail.vanderbilt.edu> Does anyone know how to build PIL for Python 1.6 under Windows? Thanks, Jonathan From jonathan.gilligan@vanderbilt.edu Tue Sep 19 16:46:19 2000 From: jonathan.gilligan@vanderbilt.edu (Jonathan M. Gilligan) Date: Tue, 19 Sep 2000 10:46:19 -0500 Subject: [Image-SIG] Building PIL with Windows NT, Python 1.6 Message-ID: <5.0.0.25.0.20000919100250.04ecc090@g.mail.vanderbilt.edu> I have succeeded in building PIL under Windows and Python 1.6 with VC++ 6.0 SP4. Since others may need to do this, I provide an outline of what I did: Make a new Visual C++ workspace in the Imaging-1.1 directory. Put two projects in it: "_imaging" and "_imagingtk". Both of these projects should be "Win32 DLL" (NOT MFC DLL) projects. Tell the AppWizard to make them empty projects. To "_imaging" add all *.c *.h in Imaging-1.1 and Imaging-1.1\libImaging except _imagingtk.c, tkImaging.c, Except.c, and coretest.c. To "_imagingtk" add "_imagingtk.c" and "tkImaging.c". Set the output (in the Project/Settings/Link property page) to _imaging.dll and _imagingtk.dll. Case is important. Python matches case on .dll file names. Add appropriate Include and Lib directories to your C++ preprocessor and linker search path settings for python16, jpeg, zlib, tcl, and tk. Add python16.lib, tcl83.lib, tk83.lib, jpeg.lib, zlib.lib (use the fully qualified path to the zlib.lib from your zlib distribution so the linker will not get confused by the zlib.lib in python, which is for zlib.pyd and will not work) to the Link Input "Object/Library modules" list. Set the C++ language options to use the "Multithreaded DLL" for the runtime C/C++ library. Edit the PIL source code to delete or comment out all lines defining or undefining INT32 and UINT32. These are typedef'ed in standard Platform SDK and Visual C++ header files and combining typedefs and preprocessor definitions for the same symbol will produce beaucoup compiler errors. (Note to /F: If you can do it for a future release, please rename your preprocessor definitions to something like PIL_INT32 etc.) Now build with Visual C++. After successfully building, copy _imaging.dll and _imagingtk.dll to your python DLLs directory. Then add the following key to your registry: HKLM\Software\Python\PythonCore\1.6\PythonPath\Imaging 1.1 In this key add a default value (i.e., blank name for the value) of type REG_SZ and contents "D:\Program Files\Python\Imaging-1.1\PIL" or wherever your PIL *.py files are. Now PIL should work. =========================================================================== Jonathan M. Gilligan From Joshua.Brauer@colostate.edu Tue Sep 19 18:40:27 2000 From: Joshua.Brauer@colostate.edu (Joshua Brauer) Date: Tue, 19 Sep 2000 11:40:27 -0600 Subject: [Image-SIG] Re: PIL Problem Message-ID: I was not loading the z libs since I didn't need them, but it seems they are necessary for PIL to work. On Mon, Sep 18, 2000 at 02:03:44PM -0600, Joshua Brauer wrote: >ImportError: ./_imaging.so: undefined symbol: inflateInit_ This symbol is from the zlib library. Is the _imaging module being linked with -lz? --amk -- ------------------------------------------------- Joshua Brauer Computer Support Scientist Department of Biochemistry and Molecular Biology Colorado State University Fort Collins, CO 80523 (970) 491-1080/pager: (970) 498-7995, #5837 ------------------------------------------------- From Moodie.Craig.CA@bhp.com Tue Sep 19 23:44:33 2000 From: Moodie.Craig.CA@bhp.com (Moodie, Craig CA) Date: Wed, 20 Sep 2000 09:44:33 +1100 Subject: [Image-SIG] FW: Converting TIFF to JPEG Message-ID: > Hi , > I managed to sus out the The _imaging C module is not installed problem by adding - import Tkinter.--got this apparent fix from the Image-SIG archives. > > # myconvert_jpeg.py > import os, sys > import Tkinter > import Image > > for infile in sys.argv[1:]: > outfile=os.path.splitext(infile)[0]+".jpg" > im=Image.open(infile) > # print infile,im.format,"%dx%d" % im.size,im.mode > im.save(outfile,"JPEG") > > However on running this I got the following raise IOError > > C:\Program Files\Python\Scripts>python myconvert_jpeg.py image12194.tif > Traceback (innermost last): > File "myconvert_jpeg.py", line 17, in ? > im.save(outfile,"JPEG") > File "C:\PROGRAM FILES\PYTHON\PIL\Image.py", line 666, in save > SAVE[string.upper(format)](self, fp, filename) > File "C:\PROGRAM FILES\PYTHON\PIL\JpegImagePlugin.py", line 298, in _save > raise IOError, "cannot write mode %s as JPEG" % im.mode > IOError: cannot write mode P as JPEG > > Previously I ran the script with the print line active and got the image format detail below. > > c:\progra~1\python\Scripts\image12194.tif TIFF 853x603 P > > Can anybody inform me as to what I should do next to enable a conversion. > Incidently the TIFF image was created using the DISLIN (Max Planck Institute) graphics libraries for Windows----RTIFF function. > Craig > > > EOM NOTICE - This message contains information intended only for the use of the addressee named above. It may also be confidential and/or privileged. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@bhp.com. From Poparosa@aol.com Mon Sep 25 08:13:06 2000 From: Poparosa@aol.com (Poparosa@aol.com) Date: Mon, 25 Sep 2000 03:13:06 EDT Subject: [Image-SIG] Can't install PIL on RedHad 6.2 Message-ID: Hello there, I was running Slackware 7.1 and installed PIL without any major issues, and now I am running on RedHat 6.2, and the "make -f Makefile.pre.in boot" command is now complaining about a /usr/lib/python1.5/config directory not having a makefile in it. I do not even have this directory, let alone a makefile for it. I am having a similar problem with the MySQL modules I had loaded with Slackware. so I do not think it is only related to the PIL, but I was hoping that someone out there could tell me what I am missing, and better yet, how to fix it. thanks in advance - pop From jwt@OnJapan.net Mon Sep 25 08:46:22 2000 From: jwt@OnJapan.net (Jim Tittsler) Date: Mon, 25 Sep 2000 16:46:22 +0900 Subject: [Image-SIG] Can't install PIL on RedHad 6.2 In-Reply-To: ; from Poparosa@aol.com on Mon, Sep 25, 2000 at 03:13:06AM -0400 References: Message-ID: <20000925164622.A23089@server.onjapan.net> On Mon, Sep 25, 2000 at 03:13:06AM -0400, Poparosa@aol.com wrote: > I was running Slackware 7.1 and installed PIL without > any major issues, and now I am running on RedHat 6.2, and > the "make -f Makefile.pre.in boot" command is now complaining > about a /usr/lib/python1.5/config directory not having a makefile > in it. I do not even have this directory, let alone a makefile for it. You need to have installed the python-devel RPM. [jwt@igloo config]$ rpm -qf /usr/lib/python1.5/config/Makefile.pre.in python-devel-1.5.2-13 From nick@nickbower.com Mon Sep 25 09:47:38 2000 From: nick@nickbower.com (nick@nickbower.com) Date: Mon, 25 Sep 2000 08:47:38 GMT Subject: [Image-SIG] Can't install PIL on RedHad 6.2 In-Reply-To: References: Message-ID: <20000925.8473800@cricket.> Wow - a slackware user with an AOL account! Now that's something you=20 don't see everyday. sorry pop - couldn't resist :) nick >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 9/25/00, 11:13:06 AM, Poparosa@aol.com wrote regarding [Image-SIG]=20 Can't install PIL on RedHad 6.2: > Hello there, > I was running Slackware 7.1 and installed PIL without > any major issues, and now I am running on RedHat 6.2, and > the "make -f Makefile.pre.in boot" command is now complaining > about a /usr/lib/python1.5/config directory not having a makefile > in it. I do not even have this directory, let alone a makefile for it= . > I am having a similar problem with the MySQL modules I had > loaded with Slackware. so I do not think it is only related to the > PIL, but I was hoping that someone out there could tell me what > I am missing, and better yet, how to fix it. > thanks in advance - pop > _______________________________________________ > Image-SIG maillist - Image-SIG@python.org > http://www.python.org/mailman/listinfo/image-sig From Poparosa@aol.com Mon Sep 25 14:25:19 2000 From: Poparosa@aol.com (Poparosa@aol.com) Date: Mon, 25 Sep 2000 09:25:19 EDT Subject: [Image-SIG] Can't install PIL on RedHad 6.2 Message-ID: <23.151f183.2700ac3f@aol.com> In a message dated 9/25/00 12:46:44 AM Pacific Daylight Time, jwt@OnJapan.net writes: << On Mon, Sep 25, 2000 at 03:13:06AM -0400, Poparosa@aol.com wrote: > I was running Slackware 7.1 and installed PIL without > any major issues, and now I am running on RedHat 6.2, and > the "make -f Makefile.pre.in boot" command is now complaining > about a /usr/lib/python1.5/config directory not having a makefile > in it. I do not even have this directory, let alone a makefile for it. You need to have installed the python-devel RPM. [jwt@igloo config]$ rpm -qf /usr/lib/python1.5/config/Makefile.pre.in python-devel-1.5.2-13 >> I could only find python-devel1.5.1-1.src..rpm, and it installed pretty fast (told me that it did not do much) with the following command: rpm -i python-devel1.5.1-1.src..rpm 1) is this the correct way to rpm the file? 2) where can I find a newer copy (I got this from http://rpmfind.net/linux/RPM/) BTW, after the rpm, the original "make -f Makefile.pre.in boot" still did not work... thanks - pop From jwt@OnJapan.net Mon Sep 25 14:36:28 2000 From: jwt@OnJapan.net (Jim Tittsler) Date: Mon, 25 Sep 2000 22:36:28 +0900 Subject: [Image-SIG] Can't install PIL on RedHad 6.2 In-Reply-To: <23.151f183.2700ac3f@aol.com>; from Poparosa@aol.com on Mon, Sep 25, 2000 at 09:25:19AM -0400 References: <23.151f183.2700ac3f@aol.com> Message-ID: <20000925223628.A23703@server.onjapan.net> On Mon, Sep 25, 2000 at 09:25:19AM -0400, Poparosa@aol.com wrote: jwt> You need to have installed the python-devel RPM. jwt> jwt> [jwt@igloo config]$ rpm -qf /usr/lib/python1.5/config/Makefile.pre.in jwt> python-devel-1.5.2-13 > I could only find python-devel1.5.1-1.src..rpm, and it installed pretty You want the version of python-devel to match the version of python you have installed, and your system architecture. If you are running on an x86 machine, and have the standard RH6.2 python-1.5.2-13.i386.rpm installed, you want to install the python-devel-1.5.2-13.i386.rpm from your RedHat 6.2 CD-ROM (or any of the many RedHat FTP mirrors around the world). rpm -ivh python-devel-1.5.2-13.i386.rpm Jim P.S. This discussion no longer has anything to do with PIL... so please consult your RedHat Linux manual or the RedHat web site about how to use RPM. From juha.o.ylitalo@nokia.com Sat Sep 30 22:36:04 2000 From: juha.o.ylitalo@nokia.com (Juha Ylitalo) Date: Sun, 1 Oct 2000 00:36:04 +0300 Subject: [Image-SIG] JPG and ImageDraw Message-ID: <20001001003603.A6085@shoes.st-paul> --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This might be basic question for all those, who have been playing with ImageDraw in past, but I've just started to do experimenting on it and ran into problems. I am trying to create system that would read JPG file in, draw rectangle on it and write the JPG file back with the same name. After my initial trials kept on failing, I went to handbook example and tried that one and it still keeps on failing. I've started to wonder if I am trying to do something that is not supported with JPG files or something ? All advices are appreciated. Here is technical description of the problem: Operating System: Debian GNU/Linux Woody Python: 1.5.2 Python-Imaging: 1.1-2 (according to Debian package) Images: Images are 3072x2048 JPG files, which have been created with=20 external program (application is pcdtoppm and it comes with=20 xpcd) Code: image =3D Image.open( newname ) draw =3D ImageDraw.ImageDraw( image ) draw.setink( 128 ) """ draw.rectangle( self.box, outline=3D128 ) """ draw.line( (0,0), image.size ) draw.line( (0, image.size[ 1 ] ), (image.size[ 0 ],0)) image.save( newname ) Error Message: bash-2.04$ python photos.py ~/public_html/photos/shows/usenix2000.cf Traceback (innermost last): File "photos.py", line 338, in ? File "photos.py", line 82, in __init__ File "photos.py", line 104, in make_photolist File "photos.py", line 183, in __init__ File "photocd.py", line 72, in convert File "/usr/lib/python1.5/site-packages/PIL/ImageDraw.py", line 107, in li= ne ink, fill =3D self._getink(fill) File "/usr/lib/python1.5/site-packages/PIL/ImageDraw.py", line 73, in _ge= tink ink =3D self.im.draw_ink(ink) TypeError: illegal argument type for built-in operation bash-2.04$=20 -- Juha Ylitalo juha.o.ylitalo@nokia.com KOM 5/3 312 http://wwwinhel.ntc.nokia.com/~jylitalo +358 40 562 6152 http://www.iki.fi/~jylitalo "Some tools are used, because its policy, others because they are good." --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE51lzDs9o7tOc1jEMRAvexAJ9lxkD02/H3YX9bGlsYkFa5TQo0QACeLvBV F8G2Oa0aXLsv0lo1GtqfrI0= =vKDz -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--