From johnsonm@redhat.com Tue Jul 6 18:06:52 1999 From: johnsonm@redhat.com (Michael K. Johnson) Date: Tue, 06 Jul 1999 13:06:52 -0400 Subject: [Image-SIG] PIL version question Message-ID: <199907061706.NAA10745@tristan.devel.redhat.com> From the PIL README: >The Python Imaging Library adds image processing capabilities to your >Python interpreter. This library provides extensive file format >support, an efficient internal representation, and fairly powerful >image processing capabilities. > >This is hopefully the only beta release of 1.0 (formerly known as >0.3). If no serious problems are found with this release, it will >be rereleased as 1.0 final before then end of January 1999. Has a 1.0 release just fallen prey to schedule pressures? Or has a serious problem been found that has prevented a 1.0 release? Thanks, and sorry to trouble you, michaelkjohnson "Magazines all too frequently lead to books and should be regarded by the prudent as the heavy petting of literature." -- Fran Lebowitz Linux Application Development http://www.redhat.com/~johnsonm/lad/ From fredrik@pythonware.com Wed Jul 7 08:56:04 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Wed, 7 Jul 1999 09:56:04 +0200 Subject: [Image-SIG] PIL version question References: <199907061706.NAA10745@tristan.devel.redhat.com> Message-ID: <003301bec84e$2a41c430$f29b12c2@secret.pythonware.com> > >From the PIL README: > >The Python Imaging Library adds image processing capabilities to your > >Python interpreter. This library provides extensive file format > >support, an efficient internal representation, and fairly powerful > >image processing capabilities. > > > >This is hopefully the only beta release of 1.0 (formerly known as > >0.3). If no serious problems are found with this release, it will > >be rereleased as 1.0 final before then end of January 1999. > > Has a 1.0 release just fallen prey to schedule pressures? Or has a > serious problem been found that has prevented a 1.0 release? a combination, as usual... for the current plan, see the product description page: http://www.pythonware.com/products/pil/ From arne.keller@ppm.u-psud.fr Thu Jul 8 16:24:31 1999 From: arne.keller@ppm.u-psud.fr (Arne Keller) Date: Thu, 08 Jul 1999 17:24:31 +0200 Subject: [Image-SIG] pbs with Jpeg Message-ID: <3784C2AF.6D19FA50@ppm.u-psud.fr> I'm trying to install PIL (Imaging-1.0b1) on linux. and I have the following compilation error: gcc -O -I./. -I/usr/local/include -DHAVE_CONFIG_H -c JpegDecode.c -o JpegDecode.o JpegDecode.c:42: parse error before `void' JpegDecode.c:48: parse error before `boolean' JpegDecode.c:55: parse error before `void' JpegDecode.c:96: parse error before `void' JpegDecode.c:100: `cinfo' undeclared here (not in a function) JpegDecode.c:100: warning: data definition has no type or storage class JpegDecode.c:105: parse error before `->' JpegDecode.c:105: conflicting types for `longjmp' /usr/include/setjmp.h:93: previous declaration of `longjmp' JpegDecode.c:105: warning: data definition has no type or storage class JpegDecode.c: In function `ImagingJpegDecode': JpegDecode.c:130: warning: assignment makes pointer from integer without a cast make: *** [JpegDecode.o] Error 1 anybody may help me?! -- Arne Keller Laboratoire de Photophysique Moleculaire du CNRS. Universite de Paris-Sud, 91405 Orsay Cedex, France. tel.: (33) 1 69 15 82 83 -- fax. : (33) 1 69 15 67 77 From fredrik@pythonware.com Fri Jul 9 09:36:01 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Fri, 9 Jul 1999 10:36:01 +0200 Subject: [Image-SIG] pbs with Jpeg References: <3784C2AF.6D19FA50@ppm.u-psud.fr> Message-ID: <005201bec9e7$88ea08e0$f29b12c2@secret.pythonware.com> Arne Keller wrote: > I'm trying to install PIL (Imaging-1.0b1) on linux. > > and I have the following compilation error: > > gcc -O -I./. -I/usr/local/include -DHAVE_CONFIG_H -c JpegDecode.c -o > JpegDecode.o > JpegDecode.c:42: parse error before `void' > JpegDecode.c:48: parse error before `boolean' > JpegDecode.c:55: parse error before `void' > JpegDecode.c:96: parse error before `void' > JpegDecode.c:100: `cinfo' undeclared here (not in a function) > JpegDecode.c:100: warning: data definition has no type or storage class > JpegDecode.c:105: parse error before `->' > JpegDecode.c:105: conflicting types for `longjmp' > /usr/include/setjmp.h:93: previous declaration of `longjmp' > JpegDecode.c:105: warning: data definition has no type or storage class > JpegDecode.c: In function `ImagingJpegDecode': > JpegDecode.c:130: warning: assignment makes pointer from integer without a cast > make: *** [JpegDecode.o] Error 1 you have an old version of the JPEG library (probably version 6, not 6a or later). either update your JPEG library, or change the offending lines from METHODDEF(...) to METHODDEF ... (and so on) From fredrik@pythonware.com Sat Jul 10 11:11:00 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Sat, 10 Jul 1999 12:11:00 +0200 Subject: [Image-SIG] ann: pil "1.0c1" now available Message-ID: <001d01becabc$89012a90$f29b12c2@secret.pythonware.com> due to changed weekend plans (Tornerspel i Grefsnäs -- se till att vara där -- jag känns igen på min mozilla.org t-shirt ;-), what was supposed to be 1.0 final is released as "PIL 1.0 release candidate 1" (aka 1.0c1) instead. grab your own copy from: http://www.pythonware.com/products/pil/ note: it hasn't been fully tested on non-Windows platforms, and the new Tkinter "plugin" mechanism is not included. the real release will appear within a few days (unless someone on this list uncovers something really serious, that is...) ovaga attack!-ly yrs /F From valdez@garlic.fnal.gov Tue Jul 13 17:11:26 1999 From: valdez@garlic.fnal.gov (Adrian Valdez of Embry_Riddle_Aeronautics_Univ) Date: Tue, 13 Jul 1999 11:11:26 -0500 (CDT) Subject: [Image-SIG] To svae a Tkinter image. Message-ID: <199907131611.LAA10628@garlic.fnal.gov> Greeting everybody! I was wondering if the PIL can grab a screen display created with Tkinter and save it to a file. It seems it can open images and edit them and save them, but what I need is not to open an image but to get the one on the screen and save it to a file. Can PIL do this?? Thank you in advance. Sincerely Adrian Valdez valdez@fnal.gov From Kingsley.Turner@praxa.com.au Thu Jul 15 00:42:38 1999 From: Kingsley.Turner@praxa.com.au (Turner, Kingsley) Date: Thu, 15 Jul 1999 09:42:38 +1000 Subject: [Image-SIG] im.save("xyz.jpg") - quality? Message-ID: <6521FD1F9256D211B5130000F87E19F348DBA4@SYDINFO> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BECE52.DFA1FC30 Content-Type: text/plain; charset="iso-8859-1" G'day, Is there any way to configure the way the PIL saves jpegs ? I've got some code to make thumbnails (ok, it's almost the same as in the manual). I'd really like to minimise the file size said thumbnails, and the best way to do this is use the JPEG 'optimise' feature of the encoder and to set the JPEG quality to about 50%. (50% is a bit dodgey for reproduction, but fine for thumbs) Does the PIL automatically do 'optimized' jpeg saves ? Is there a way I can adjust the quality factor for the compression algorithm ? ta muchly, -kt -- Kingsley Turner Praxa x399 or mobile 0419621568 "He's not the messiah, he's a very naughty boy!" -Brian's Mum ------_=_NextPart_001_01BECE52.DFA1FC30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable im.save("xyz.jpg") - quality?

G'day,

Is there any way to configure the way the PIL saves = jpegs ?

I've got some code to make thumbnails (ok, it's = almost the
same as in the manual). 

I'd really like to minimise the file size said = thumbnails, and the
best way to do this is use the JPEG 'optimise' = feature of the encoder
and to set the JPEG quality to about 50%.  (50% = is a bit dodgey for
reproduction, but fine for thumbs)

Does the PIL automatically do 'optimized' jpeg saves = ?

Is there a way I can adjust the quality factor for = the compression
algorithm ?

ta muchly,
-kt

--
Kingsley Turner
Praxa x399 or mobile 0419621568
"He's not the messiah, he's a very naughty = boy!"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = -Brian's Mum

------_=_NextPart_001_01BECE52.DFA1FC30-- From fredrik@pythonware.com Thu Jul 15 02:02:29 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Thu, 15 Jul 1999 03:02:29 +0200 Subject: [Image-SIG] im.save("xyz.jpg") - quality? References: <6521FD1F9256D211B5130000F87E19F348DBA4@SYDINFO> Message-ID: <000801bece5d$b6c3d3c0$f29b12c2@secret.pythonware.com> im.save("xyz.jpg") - quality?Turner, Kingsley wrote: > Is there any way to configure the way the PIL saves jpegs ? > I've got some code to make thumbnails (ok, it's almost the > same as in the manual). > I'd really like to minimise the file size said thumbnails, and the > best way to do this is use the JPEG 'optimise' feature of the encoder > and to set the JPEG quality to about 50%. (50% is a bit dodgey for > reproduction, but fine for thumbs) > Does the PIL automatically do 'optimized' jpeg saves ? > Is there a way I can adjust the quality factor for the compression > algorithm ? try: im.save("xyz.jpg", quality=50, optimize=1) for details, see the description of the save method at: http://www.pythonware.com/library/pil/handbook/image.htm the available save options are found here: http://www.pythonware.com/library/pil/handbook/formats.htm From fredrik@pythonware.com Thu Jul 15 02:08:43 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Thu, 15 Jul 1999 03:08:43 +0200 Subject: [Image-SIG] problems with Imaging 1.0b1 References: <001301bec283$11ff4940$0f42d3d4@gej98> Message-ID: <003201bece5f$379b6b60$f29b12c2@secret.pythonware.com> Jens Gelhaar wrote: > but, I got alway the following error message > File "F:\Python\JPEGKleinerMachen.py", line 11, in ? > im.save(outfile,"JPEG") > File "E:\Programme\Python\Lib\imaging\Image.py", line 654, in save > self.load() > File "E:\Programme\Python\Lib\imaging\ImageFile.py", line 134, in load > d = Image._getdecoder(self.mode, d, a, self.decoderconfig) > File "E:\Programme\Python\Lib\imaging\Image.py", line 225, in _getdecoder > return apply(decoder, (mode,) + args + extra) > TypeError: illegal argument type for built-in operation > > What is wrong? The example is from the tuturial? looks like your PIL python library doesn't match the _imaging module. try: >>> import Image >>> Image.__file__ 'c:\\somewhere\\Image.pyc' >>> Image.core.__file__ 'c:\\somewhere\\_imaging.dll' and make sure those filenames are what you expect... From fredrik@pythonware.com Thu Jul 15 02:12:59 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Thu, 15 Jul 1999 03:12:59 +0200 Subject: [Image-SIG] To svae a Tkinter image. References: <199907131611.LAA10628@garlic.fnal.gov> Message-ID: <003301bece5f$37ef7ed0$f29b12c2@secret.pythonware.com> Adrian Valdez wrote: > Greeting everybody! I was wondering if the PIL can grab a > screen display created with Tkinter and save it to a file. It seems it > can open images and edit them and save them, but what I need is not to > open an image but to get the one on the screen and save it to a > file. Can PIL do this?? nope. you could try doing the screen capture by calling "xv" or "xwd" or some other tool from your script. or you can surf over to www.scriptics.com and see if you can find some Tk extension... From fredrik@pythonware.com Mon Jul 19 12:40:01 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Mon, 19 Jul 1999 13:40:01 +0200 Subject: [Image-SIG] any comments on 1.0c1? References: <001d01becabc$89012a90$f29b12c2@secret.pythonware.com> Message-ID: <00c701bed1db$707bd800$f29b12c2@secret.pythonware.com> > the real release will appear within a few days (unless someone > on this list uncovers something really serious, that is...) 1.0 final is almost ready for distribution. it will be almost identical to 1.0c1, with the following additions: -- the ability to hook up with Tk without rebuilding the _tkinter module. -- some minor tweaks to compile silently on a few more platforms (gcc, axp). is there anything else I've missed? please let me know before wednesday! From dmarko@digi-trade.cz Wed Jul 21 10:42:25 1999 From: dmarko@digi-trade.cz (dmarko@digi-trade.cz) Date: Wed, 21 Jul 1999 10:42:25 +0100 Subject: [Image-SIG] PIL fonts quetstion Message-ID: <412567B5.0035CE5C.00@digi-trade.cz> I would like to use international fonts (ISO-8859-2) with PIL. I have converted appropriate pcf font, but when I want to use it with int. characters, error occures. Without intl. characters, all seems to work fine. Do i need make some change to "metrics.dat" file (there was no change after font conversion) or what to do? Thanks, David Marko From fredrik@pythonware.com Wed Jul 21 18:15:26 1999 From: fredrik@pythonware.com (Fredrik Lundh) Date: Wed, 21 Jul 1999 19:15:26 +0200 Subject: [Image-SIG] PIL fonts quetstion References: <412567B5.0035CE5C.00@digi-trade.cz> Message-ID: <002201bed39c$a0fa9c10$f29b12c2@secret.pythonware.com> dmarko@digi-trade.cz wrote: > I would like to use international fonts (ISO-8859-2) with PIL. I have > converted appropriate pcf font, but when I want to use it with int. > characters, error occures. what error? From schorsch@schorsch.com Fri Jul 23 11:11:24 1999 From: schorsch@schorsch.com (Georg Mischler) Date: Fri, 23 Jul 1999 06:11:24 -0400 (EDT) Subject: [Image-SIG] PIL with dynamic image data? Message-ID: Hi all imageneers... I sent this question allready to the list a few months ago, and was told that nobody had time to answer it before the (then) pending next release of PIL was out. Looks like this might be happening right now again... Since I have solved most of my non PIL related problems in the mean time, I still decided to just bother the list again. What I need is not a detailed description about every step (though I wouldn't complain ;), but just a few pointers about which possible ways I should study more carefully than others. I'm not a complete newbie to programming in Python or C (though my real background is architecture and lighting design), but finding the right way through a library package like PIL will be definitively easier with a little expert help. Thanks in advance for any information! Here comes the problem: I want to use PIL for the image manupulation module of a larger python application. However, I have to handle an input image format with is a bit different than most others. The images are generated by the lighting simulation system Radiance (http://radsite.lbl.gov), and store luminance values as seen from a certain view in of a simulated scene. Due to the high dynamic range of this data the values are stored in floating point format, represented by 4 bytes for each pixel. The first three bytes are the red, green and blue mantissas, and the fourth byte is a common exponent (the format also uses run length encoding, but that should not a problem). So far everything is fine, routines to read, store and convert this format exist in ansi C. The question that bothers me is how difficult it would be to use PIL for handling this kind of data, and how tricky the needed extensions will be to write. The user should be able to read such a file and the result will be converted to rgb image brighness values according to a gamma function for display. Users will want to edit the gamma value and see the result, as well as the "exposure" value, which sets an absolute relation between luminance and brightness. There may be other filters needed, which reduce the dynamic range of the data according to the way the human eye would perceive a given scene in reality. I assume that I will have to keep two sets of data in memory (unless I want to reread the original file for every filter operation), one holding the luminance values, and the other the converted brightness values for display. Now come the questions: - What PIL format will be best for handling the different kinds of data? I guess that RGB (RGBA?) is simplest for dislpay. - Is it correct that the F format is currently designed for greyscale data only? Would I need to use three sets of F data to hold color luminance? - Could it make sense to "abuse" RGBA and store everything in there as it comes from the file? - Would it be simpler to add a new file format for dynamic floating point color data? If yes, how simple? - How difficult will it be to add filters to convert from and to each of the combined F, abused RGBA or new trippleF formats? - Can filters also be implemented as plugins? - I just realised that I haven't found out yet if plugins have to be implemented in python, or if they can also be written in C... - Any simple and obvious solution I may have overlooked? - Any other questions I should have asked first? ;) If I actually manage to implement the functionality as above with PIL (and your help!), I plan to contribute the parts of it that are of general interest back to PIL, though this may still be months away. Ah, and before I forget, everything should work with NT and unix. Thanks for any insights! -schorsch -- Georg Mischler -- simulation developper -- schorsch at schorsch.com +schorsch.com+ -- lighting design tools -- http://www.schorsch.com/ From KCAZA@cymbolic.com Fri Jul 23 20:28:00 1999 From: KCAZA@cymbolic.com (Kevin Cazabon) Date: Fri, 23 Jul 1999 12:28:00 -0700 Subject: [Image-SIG] Creating HUGE images... Message-ID: I'm trying to develop an easy method to create images much larger than the memory available on the host computer, and have one big question: -Is there any way to create a NEW image on the hard drive (with blank background) without first creating it in memory? This way, I can create the 'canvas' as large as I want, and paste in small chunks of data manually as I go, staying within the memory limits of the machine. (Writing to an existing file shouldn't be a problem, just creating the blank file in the first place is causing me problems) I know I can read small sections of an image file at a time, using Fred's earlier suggestion of modifying the .tile attribute. What I really need now is same thing for writing to a file. Thanks, Kevin Cazabon. From KCAZA@cymbolic.com Thu Jul 29 23:07:20 1999 From: KCAZA@cymbolic.com (Kevin Cazabon) Date: Thu, 29 Jul 1999 15:07:20 -0700 Subject: [Image-SIG] Creating HUGE images... Message-ID: Well, huge is 1.2GB or so... a full-res 50x50" image at 406.4dpi (for output on a LightJet laser photoplotter, using photographic paper). I know I could PROBABLY thrash an NT box around overnight with such an image and a whack of VM, but I figured that if I could simply create a "dummy" file on the hard drive, and re-write the data portion line-by-line manually it would be MUCH faster. Alternatively, is there an easy way to create the header and trailer portions of a standard TIFF file (I'd know the size and details of the final image before I started) so that I could do all this manually? My alternative is to just write a RAW file to the HD, and open it as such in my imaging program (which does support RAW). That's the ugly way to do it. Thanks, Kevin. >>> "Barry A. Scott" 07/29/99 02:48PM >>> How HUGE is HUGE? Can you use virtual memory to get the memory size you need? Limits would depend on your OS of course. Apart from LInux (limit of 128MB swap partition last I played) most OS seem to let you get 1GB to 3GB of VM on a Pentium powered box. BArry -----Original Message----- From: image-sig-admin@python.org [mailto:image-sig-admin@python.org]On Behalf Of Kevin Cazabon Sent: Friday, July 23, 1999 8:28 PM To: image-sig@python.org Subject: [Image-SIG] Creating HUGE images... I'm trying to develop an easy method to create images much larger than the memory available on the host computer, and have one big question: -Is there any way to create a NEW image on the hard drive (with blank background) without first creating it in memory? This way, I can create the 'canvas' as large as I want, and paste in small chunks of data manually as I go, staying within the memory limits of the machine. (Writing to an existing file shouldn't be a problem, just creating the blank file in the first place is causing me problems) I know I can read small sections of an image file at a time, using Fred's earlier suggestion of modifying the .tile attribute. What I really need now is same thing for writing to a file. Thanks, Kevin Cazabon. _______________________________________________ Image-SIG maillist - Image-SIG@python.org http://www.python.org/mailman/listinfo/image-sig