elsereturn0;case4:logo(x 42,y 10,t3,COPY_PUT);

Access denied | wakaba.c3.cx used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (wakaba.c3.cx) has banned your access based on your browser's signature (3a90-ua98).I am currently using PIL 1.1.2 under MacPython (with a W user interface) tomake web photo albums but am very frustrated with the lack of antialiasingwhen downsampling -- using smoothing instead results in very soft images.The new ANTIALIAS filter in 1.1.3 looks to be the perfect cure for thisproblem, and I'm hoping it will also fix the warnings I've been gettingabout obsolete regexp packages.
But, the only distribution I've seen of1.1.3 is the source.
Is it possible to get this working under MacPythonwithout a recent version of CodeWarrior (I do have a very old CW and arecent gcc), and is there information available somewhere on how to dothis, or is there a compiled version available anywhere?Failing that, is there another OS X Python version I should be using, andif so what's involved in setting it up and creating GUI-based standaloneapplications with it?Please copy me on any responses since I only look at this list sporadically.--David Eppstein
UC Irvine Dept. of Information & Computer Scienceeppstein@ics.uci.edu From Jack.Jansen@cwi.nl
5 09:51:10 2002From: Jack.Jansen@cwi.nl (Jack Jansen)Date: Mon, 5 Aug :10 +0200Subject: [Image-SIG] How to get 1.1.3 on MacOS X?In-Reply-To: &2.168.1.102]&Message-ID: &7D52D496-A850-11D6-B3C4-CE@cwi.nl&On Monday, August 5, 2002, at 01:44 , David Eppstein wrote:I am currently using PIL 1.1.2 under MacPython (with a W userinterface) to make web photo albums but am very frustrated with thelack of antialiasing when downsampling -- using smoothing insteadresults in very soft images. The new ANTIALIAS filter in 1.1.3 looks tobe the perfect cure for this problem, and I'm hoping it will also fixthe warnings I've been getting about obsolete regexp packages.
But,the only distribution I've seen of 1.1.3 is the source.
Is it possibleto get this working under MacPython without a recent version ofCodeWarrior (I do have a very old CW and a recent gcc), and is thereinformation available somewhere on how to do this, or is there acompiled version available anywhere?David,if I find the time I'll try to upgrade pil to 1.1.3 for the next (2.3)MacPython release. But that could be a while off...Failing that, is there another OS X Python version I should be using,and if so what's involved in setting it up and creating GUI-basedstandalone applications with it?If you use OSX unix-Python (a.k.a. MachoPython) there should be noproblem building pil from source yourself (assuming you have the OSXdeveloper tools). But: if you want a fully functional W you'll probablyhave to build Python from the CVS sources (or, again, wait for 2.3).--- Jack Jansen
&Jack.& -- If I can't dance I don't want to be part of your revolution -- EmmaGoldman -From gherman@darwin.in-berlin.de
5 14:38:44 2002From: gherman@darwin.in-berlin.de (Dinu Gherman)Date: Mon, 5 Aug :44 +0200Subject: [Image-SIG] PIL/JPEG troubleMessage-ID: &A94266AD-A878-11D6-A975-@darwin.in-berlin.de&--Apple-Mail-1-Content-Transfer-Encoding: 7bitContent-Type: text/charset=US-ASCII;format=flowedHi, I've just joined this mailing list after running into a problemthat seems to be a reoccurring one, at least if I look into the listarchives. I thought it should not occur anymore after PIL moved tousing distutils, but maybe it's me doing something wrong? Has any-body else succeeded in compiling PIL with JPEG support on Mac OS X?Thanks,DinuForwarded from Pythonmac-SIG:Von: Dinu Gherman &gherman@darwin.in-berlin.de&Datum: Mo, 05. Aug. :56 Europe/BerlinAn: pythonmac-sig@python.orgBetreff: [Pythonmac-SIG] PIL/JPEG troubleHi, I've got some trouble on OS X telling PIL where to find the JPEGlibrary. This results in &IOError: decoder jpeg not available& errors.I've installed JIG's library libjpeg.a into /usr/local/lib and itstools into /usr/local/bin (wrjpgcom, rdjpgcom, jpegtran, djpeg, cjpeg).I've also tried a configure pass with --with-jpeg=/usr/local/lib butall in vain.I've attached a sample installation script which should automaticallyfetch zlib, jpeg and pil from the net and install them the &canonical&way... Below I've also pasted the results of running PIL'sMiniTest/test.py.Does anybody have an idea?Thanks,Dinu[localhost:Imaging-1.1.3] dinu% python MiniTest/test.py*****************************************************************Failure in example: _info(Image.open(&Images/lena.jpg&))from line #24 of test.testimageException raised:Traceback (most recent call last):File &MiniTest/doctest.py&, line 499, in _run_examples_innerexec compile(source, &&string&&, &single&) in globsFile &&string&&, line 1, in ?File &MiniTest/test.py&, line 12, in _infoim.load()File &PIL/ImageFile.py&, line 140, in loadd = Image._getdecoder(self.mode, d, a, self.decoderconfig)File &PIL/Image.py&, line 255, in _getdecoderraise IOError(&decoder %s not available& % decoder_name)IOError: decoder jpeg not available*****************************************************************Failure in example: type(im.im) # internal image attributefrom line #31 of test.testimageExpected: &type 'None'&Got: &type 'NoneType'&1 items had failures:2 of
40 in test.testimage***Test Failed*** 2 failures.*** 2 tests of 40 failed.--Apple-Mail-1-Content-Disposition:filename=install.pyContent-Transfer-Encoding: 7bitContent-Type: application/x-mac-creatorR2A6368;x-unix-mode44;x-mac-typeT455854;name=&install.py&#! /usr/bin/env python&&&install.py - a funky install script.Sample usage:python install.py zlib jpeg pilpython install.py pil&&&import os, string, sysfrom os.path import basename, joinfrom urllib import urlopen################################################################################ Package descriptions###############################################################################jpeg = {&name&:
&JPEG Support for PIL&,&homepage&: &http://www.ijg.org&,&download&: &http://www.ijg.org/files/jpegsrc.v6b.tar.gz&,&install&: &&&\tar xfz jpegsrc.v6b.tar.gzcd jpeg-6b./configuremakemake testsudo make installsudo make install-lib&&&}zlib = {&name&:
&Zlib&,&homepage&: &http://www.gzip.org/zlib/&,&download&: &http://www.gzip.org/zlib/zlib-1.1.4.tar.gz&,&install&: &&&\tar xfz zlib-1.1.4.tar.gzcd zlib-1.1.4./configuremakesudo make install&&&}pil = {&name&:
&PythonWare's PIL 1.1.3&,&homepage&: &/products/python/index.htm&,&download&: &/downloads/Imaging-1.1.3.tar.gz&,&install&: &&&\tar xfz Imaging-1.1.3.tar.gzcd Imaging-1.1.3cd libImaging./configuremakecd ..python setup.py buildsudo python setup.py install&&&}################################################################################ Installation###############################################################################def install(packages):dir = os.getcwd()for p in packages:try:p = globals()[p]except:print &Skipping&, pcontinue# get package detailsname = p['name']url = p['download']instructions = p['install']# download, if neededpath = join(dir, basename(url))if not os.path.exists(path):print &Downloading&, namedata = urlopen(url).read()open(path, &wb&).write(data)# installprint &Installing&, nameopen('install.sh', 'w').write(instructions)os.system('tcsh -f install.sh')if __name__ == '__main__':packages = sys.argv[1:]install(packages)--Apple-Mail-1---rcati@cenpra.gov.br
5 20:50:33 2002From: rcati@cenpra.gov.br (Mauricio Caliggiuri Inforcati)Date: Mon, 5 Aug :33 -0300Subject: [Image-SIG] Reading 16bit imageMessage-ID: &.rcati@cenpra.gov.br&Hi,how can I use the &raw decoder& to read a binary 16 bit image?I tried doing this:import Imagedata = open('binary_file').read()
#string buffer with datasize = (256 256)
#this is really its sizemode = 'F;16'image = Image.fromstrin(mode,size,data,&raw&)Python tells me this mode (F;16) does not exist. So, wich mode must I use for16 bit images?Could somebody help me?thanks,Mauricio InforcatiFrom aureli@ipk.fhg.de
6 10:03:38 2002From: aureli@ipk.fhg.de (Aureli Soria Frisch)Date: Tue, 6 Aug :38 +0200Subject: [Image-SIG] Reading 16bit imageIn-Reply-To: &.rcati@cenpra.gov.br&References: &.rcati@cenpra.gov.br&Message-ID: &a3.97.92.109]&how can I use the &raw decoder& to read a binary 16 bit image?I tried doing this:import Imagedata = open('binary_file').read()
#string buffer with datasize = (256 256)
#this is really its sizemode = 'F;16'image = Image.fromstrin(mode,size,data,&raw&)Python tells me this mode (F;16) does not exist. So, wich mode must I use for16 bit images?Could somebody help me?I submitted a while ago a question related to the possibility ofopening TIF files with 16 bit depth that remained with no answer...It would be interesting to know how to work with 16 bit files in PILin general (it does not seem to be possible with the open sourceversion of PIL)...Thanks,Aureli--#################################Aureli Soria FrischFraunhofer IPKDept. Pattern Recognitionpost: Pascalstr. 8-9, 10587 Berlin, Germanye-mail: aureli@ipk.fhg.defon: +49 30 fax: +49 30 3917517web: #################################From volkmer@mpi-cbg.de
9 10:36:11 2002From: volkmer@mpi-cbg.de (Michael Volkmer)Date: Fri, 09 Aug :11 +0200Subject: [Image-SIG] Reading 16bit imageReferences: &.rcati@cenpra.gov.br& &a3.97.92.109]&Message-ID: &3D538D0B.2060701@mpi-cbg.de&I use PIL 1.1.3 to read uncompressed 16 bit TIFF images. LZW compressedtiffs doesn't work for me.PIL uses the &I,16& mode in the default Image.open(). I addition I addedthe following line to the TiffImagePlugin.py OPEN_INFO :(1, 1, (16,), ()): (&I;16&, &I;16&)I'm not shure if this is really needed.Most of the PIL functions doesn't seem to work in this mode
so Iconverted the Image to 32bit withim = Image.open(&file&).convert(&I&) in order to access the image datawith putpixel()/getpixel() at least.M. VolkmerAm 08/06/ AM, Aureli Soria Frisch schrieb:how can I use the &raw decoder& to read a binary 16 bit image?I tried doing this:import Imagedata = open('binary_file').read()
#string buffer with datasize = (256 256)
#this is really its sizemode = 'F;16'image = Image.fromstrin(mode,size,data,&raw&)Python tells me this mode (F;16) does not exist. So, wich mode must Iuse for16 bit images?Could somebody help me?I submitted a while ago a question related to the possibility ofopening TIF files with 16 bit depth that remained with no answer...It would be interesting to know how to work with 16 bit files in PILin general (it does not seem to be possible with the open sourceversion of PIL)...Thanks,AureliFrom rtrocca@libero.it
9 16:08:21 2002From: rtrocca@libero.it (Riccardo Trocca)Date: Fri, 09 Aug :21 +0200Subject: [Image-SIG] built installer for PIL 1.1.3 for python2.2 on win32Message-ID: &3D53DAE5.6080103@libero.it&Well, the title says it all. If somebody is interested, you can find it at:RiccardoFrom anthra.norell@bluewin.ch
9 16:17:41 2002From: anthra.norell@bluewin.ch (Frederic Rentsch)Date: Fri, 09 Aug :41 +0200Subject: [Image-SIG] Importing and reloadingMessage-ID: &3D53DD15.2000607@bluewin.ch&Who knows where ImageOps is? The manual explains it, but if I say&import ImageOps& it says &ImportError: No module named ImageOps&. Thedownloading references name packages, not their contents. I am using thelibrary for Windows.And a more general question. &import MODULE& doesn't work for modulesbeing developed. The formula for a forced import is &reload (MODULE)&. Ihaven't found an equivalent reloading alternative to &from MODULE import.&. Running modules under construction being such a prevalent mode ofoperation., there just has to be a trick.FredericFrom rtrocca@libero.it
9 16:21:35 2002From: rtrocca@libero.it (Riccardo Trocca)Date: Fri, 09 Aug :35 +0200Subject: [Image-SIG] built installer for PIL 1.1.3 for python2.2 on win32 CORRECTIONMessage-ID: &3D53DDFF.7040005@libero.it&Sorry, I was in a hurry...The right URL is:Anyway I use this mail to say that it is just my first attempt atbuilding it and I've used a old tifflib I had. I'd like to receivesuggestions and I'll revuild it with a new tiflib. Futhermore I hopethat next week I'll be able to upload some modules I made that allowspython to read AVI files, QuickTime movies and frames from a framegrabber.RiccardoFrom klimek@grc.nasa.gov
9 18:19:06 2002From: klimek@grc.nasa.gov (Bob Klimek)Date: Fri, 09 Aug :06 -0400Subject: Fwd: Re: [Image-SIG] Reading 16bit imageMessage-ID: &4.2.2.15.00aa0198@parrot.grc.nasa.gov&I've managed to read in a 16-bit TIFF image in the following way. I don'tknow if it will work for all 16-bit images but here it goes. It read 16-bitimages save by a package called IMAP.imgDir = '/home/klimek/Images/16-bit'inFile = os.path.abspath(os.path.join(imgDir, '16-bit-IMAP.tif'))f = open(inFile, 'rb')allData = f.read()f.close()offset = 8 # this was determined from &StripOffsets& tag by reading an8-bit IMAP imagedata = allData[offset : /8+offset] # 16-bit saved by IMAPim = Image.fromstring(&F&, (), data, &raw&, &F;16&, 0,1)pix1 = im.getpixel((50,50))pix2 = im.getpixel((500,300))print pix1, pix2BobDate: Fri, 09 Aug :11 +0200I use PIL 1.1.3 to read uncompressed 16 bit TIFF images. LZW compressedtiffs doesn't work for me.PIL uses the &I,16& mode in the default Image.open(). I addition I addedthe following line to the TiffImagePlugin.py OPEN_INFO :(1, 1, (16,), ()): (&I;16&, &I;16&)I'm not shure if this is really needed.Most of the PIL functions doesn't seem to work in this mode
so Iconverted the Image to 32bit withim = Image.open(&file&).convert(&I&) in order to access the image datawith putpixel()/getpixel() at least.M. VolkmerAm 08/06/ AM, Aureli Soria Frisch schrieb:how can I use the &raw decoder& to read a binary 16 bit image?I tried doing this:import Imagedata = open('binary_file').read()
#string buffer with datasize = (256 256)
#this is really its sizemode = 'F;16'image = Image.fromstrin(mode,size,data,&raw&)Python tells me this mode (F;16) does not exist. So, wich mode must Iuse for16 bit images?Could somebody help me?I submitted a while ago a question related to the possibility of openingTIF files with 16 bit depth that remained with no answer...It would be interesting to know how to work with 16 bit files in PIL ingeneral (it does not seem to be possible with the open source version ofPIL)...Thanks,Aureli_______________________________________________Image-SIG maillist
Image-SIG@python.orgFrom tim@
Sun Aug 11 23:28:40 2002From: tim@ (Tim Penhey)Date: Sun, 11 Aug :40 +0100Subject: [Image-SIG] PIL 1.1.3 and Python 2.2.1 on Win2kMessage-ID: &HOEPLDNJPCIDBMLHJFMIOEDKCGAA.tim@&I am attempting to build PIL 1.1.3 on Win2k, and having a few problems.I grabbed the zlib win32 binaries, and built the jpeg libs.However I don't have tcl/tk installed except for what came with the Python2.2.1 from python.org for Windows.
The PIL code requires tk.h.
Can someonepoint me in the direction of what else I am going to need to build it?I will provide the resulting binaries if desired, or a VC++ project file.Thanks,TimFrom
Mon Aug 12 19:14:32 2002From:
(Scott Hassan)Date: Mon, 12 Aug :32 -0700 (PDT)Subject: [Image-SIG] PIL: Image.py: blend functionMessage-ID: &.3@&Why does the new PIL 1.1.3 blend function limit the range of alpha inthe positive?
When this is limited, you cannot brighten anImage...only darken it.
Verion 1.1.1 works differently.I changed the line &elif alpha &= 1.0:& to read &elif alpha == 1.0:&and everything works now.Scott-----------------------------------------------------------------------------def blend(im1, im2, alpha):&Interpolate between images.&if alpha &= 0.0:return im1elif alpha &= 1.0:return im2im1.load()im2.load()return im1._new(core.blend(im1.im, im2.im, alpha))From
Tue Aug 13 01:18:49 2002From:
(icubed)Date: Mon, 12 Aug :49 -0700Subject: [Image-SIG] Error in compiling PIL using VC 6 -Message-ID: &ICEOKKGOODKHLEGKGJAIAEJGCAAA.&hi, allWhen i try to compile latest PIL using VC6, I got the following error:Dibc..... error C2632: 'int' followed by 'int' is illegalHow to solve this problem?Thanks.shichangFrom bh@intevation.de
Tue Aug 13 09:59:57 2002From: bh@intevation.de (Bernhard Herzog)Date: 13 Aug :57 +0200Subject: [Image-SIG] Error in compiling PIL using VC 6 -In-Reply-To: &ICEOKKGOODKHLEGKGJAIAEJGCAAA.&References: &ICEOKKGOODKHLEGKGJAIAEJGCAAA.&Message-ID: &6qr8h3rv5e.fsf@thetis.intevation.de&&icubed& && writes:hi, allWhen i try to compile latest PIL using VC6, I got the following error:Dibc..... error C2632: 'int' followed by 'int' is illegalHow to solve this problem?I'm not sure if it was exactly the same error, but fixed it by includingbasetsd.h before Imaging.h in the files where it was a problem. Thecomment I put into the files reads:/* include this under windows because it defines INT32 and UINT32 as* typedefs which won't work if it's included after ImPlatform.h which* contains preprocessor macros with those names*/#include &basetsd.h&Bernhard--Intevation GmbH
From dahn@llnl.gov
Wed Aug 14 19:56:34 2002From: dahn@llnl.gov (Dong H. Ahn)Date: Wed, 14 Aug :34 -0700Subject: [Image-SIG] Python2.2 and PIL1.1.3Message-ID: &5.0.0.25.2.00.02fdb220@mail-lc.llnl.gov&Hi all,I'm trying to install PIL1.1.3 for Python 2.2.1 in Irix and Tru64 platforms.It seemed to compile and install well, but it complained as follows when I wastrying to use it with script files provided under Scripts (e.g. viewer.py):/usr/apps/python/opt/lib/python2.2/site-packages/PIL/Image.py:53:RuntimeWarning: Python C API version mismatch for module _imaging: ThisPython has API version 1011, module _imaging has version 1010.import _imaging/usr/apps/python/opt/lib/python2.2/site-packages/PIL/ImageTk.py:123:RuntimeWarning: Python C API version mismatch for module _imagingtk: ThisPython has API version 1011, module _imagingtk has version 1010.After this complaints, everything appears to work well.Does anyone know how to address this complaints?Best,-Dong Ahn--.--;Dong Hyuk AhnDevelopment Environment GroupLawrence Livermore National LaboratoryT3520, Room 1145, L-550925-422-1939From
Wed Aug 14 21:13:19 2002From:
(Fredrik Lundh)Date: Wed, 14 Aug :19 +0200Subject: [Image-SIG] Python2.2 and PIL1.1.3References: &5.0.0.25.2.00.02fdb220@mail-lc.llnl.gov&Message-ID: &00e901c243cf$0a7a8c90$ced241d5@hagrid&Dong H. Ahn wrote:/usr/apps/python/opt/lib/python2.2/site-packages/PIL/Image.py:53:RuntimeWarning: Python C API version mismatch for module _imaging: ThisPython has API version 1011, module _imaging has version 1010.import _imaging/usr/apps/python/opt/lib/python2.2/site-packages/PIL/ImageTk.py:123:RuntimeWarning: Python C API version mismatch for module _imagingtk: ThisPython has API version 1011, module _imagingtk has version 1010.this means that you've built the library using include files forPython 2.1, but are running them with a 2.2 interpreter.one common reason is that you had a 2.1 interpreter installedas &python& when you ran the build file.&/F&From jpablo@kan.ajusco.upn.mx
Thu Aug 15 23:37:24 2002From: jpablo@kan.ajusco.upn.mx (Juan Pablo Romero)Date: 15 Aug :24 -0500Subject: [Image-SIG] printing under windowsMessage-ID: &.7753.19.camel@kan.ajusco.upn.mx&Hi all!I'm building a little app using tkinter/ it draws something onthe screen and possible prints it.Right now I'm using Tkinter.Canvas.My questions is: There exist some way to print canvas content in windows(without exporting to postscript)?I realize that I could do the drawings using PIL and then save theimage but I'd like to use something like ametafile.Thanks in advance.Juan PabloFrom Schutte@fel.tno.nl
Sat Aug 17 10:23:13 2002From: Schutte@fel.tno.nl (Klamer Schutte)Date: Sat, 17 Aug :13 +0200Subject: [Image-SIG] Reading 16bit imageReferences: &.rcati@cenpra.gov.br& &a3.97.92.109]&Message-ID: &3D5E1601.94ECE332@fel.tno.nl&Aureli,All over the PIL source there seem to be hooks for 16 bit TIFF support.I hacked the code a while ago to have it working to my needs (reading16 bit usigned int tiffs) and it sort of worked (arithmetic not definedon 16 bits, so casting to 32 bit / float needed).If you really are interested I will dust it off and package it soyou can use it as well.KlamerAureli Soria Frisch wrote:how can I use the &raw decoder& to read a binary 16 bit image?I tried doing this:import Imagedata = open('binary_file').read()
#string buffer with datasize = (256 256)
#this is really its sizemode = 'F;16'image = Image.fromstrin(mode,size,data,&raw&)Python tells me this mode (F;16) does not exist. So, wich mode must I use for16 bit images?Could somebody help me?I submitted a while ago a question related to the possibility ofopening TIF files with 16 bit depth that remained with no answer...It would be interesting to know how to work with 16 bit files in PILin general (it does not seem to be possible with the open sourceversion of PIL)...Thanks,Aureli--#################################Aureli Soria FrischFraunhofer IPKDept. Pattern Recognitionpost: Pascalstr. 8-9, 10587 Berlin, Germanye-mail: aureli@ipk.fhg.defon: +49 30 fax: +49 30 3917517web: #################################_______________________________________________Image-SIG maillist
Image-SIG@python.orgFrom
Tue Aug 20 15:06:58 2002From:
(Peter Dyson)Date: Wed, 21 Aug :58 +1000Subject: [Image-SIG] re: resize filter typesMessage-ID: &3D624D02.&Hi,I see the imaging lib has 3 different resize filters - nearest, bilinearand bicubic. Are there any plans for a fractal
interpolation filter asdemonstrated here:Any comments are appreciated.--regards,Peter DysonICQ: 9839053From jh@comunit.de
Tue Aug 20 14:47:27 2002From: jh@comunit.de (Janko Hauser)Date: Tue, 20 Aug :27 +0200Subject: [Image-SIG] re: resize filter typesReferences: &3D624D02.&Message-ID: &3D67@comunit.de&This is a multi-part message in MIME format.--------------Content-Type: text/ charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bitPeter Dyson wrote:Hi,I see the imaging lib has 3 different resize filters - nearest,bilinear and bicubic. Are there any plans for a fractal
interpolationfilter as demonstrated here:Any comments are appreciated.The newest version of PIL has also an antialiasing filter, which givesvery good results. An example is attached, it's not as good as thefractal filter mentioned there, but a lot better than the bicubic filterand a lot smaller than the fractal jpg :-)HTH,__Janko--------------Content-Type: image/name=&tmp.jpg&Content-Transfer-Encoding: base64Content-Disposition:filename=&tmp.jpg&/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAC0Ad0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZ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wKKKiQdSxGBT2FFFLoPqCdKcBRRUFEU3Ss24Y4PJooqGaUzMlJJ5NNQDFFFSd0Nhp4NSxjJoopo1ewso+U1mTEiQUUVExRJo6dc/wCroopLYGctqB+dqpW/Mq0UUIpbGpJwy44qUklRzRRQSQyDiqcoGKKKEIozCq6jk0UUmIe4GOlJD/rKKKliRqxj5akTrRRTBFuPmriqNo4ooqOoH//Z----------------From
Wed Aug 21 22:55:31 2002From:
(Wolfgang Schorer)Date: Wed, 21 Aug :31 -0500Subject: [Image-SIG] Decorder error -2Message-ID: &31.5d5c393d.&I installed PIL (apparently with no errors).Now, when I want to read an jpg-file in Python, I always get theerror:decoder error -2 when reading fileThe opening of it reads the header.Any hints?Thanks in advance.WolfFrom sfaulconer@
Thu Aug 22 04:29:11 2002From: sfaulconer@ (Steven Faulconer)Date: Wed, 21 Aug :11 -0500Subject: [Image-SIG] 'Compile' problemMessage-ID: &3D645A87.7000603@&Hello everyone,I'm just getting started in learning python, and since most of my normalwork involves image manipulation, I thought I would give the PIL a runthrough. I'm having a bit of difficulty getting it installed properly.Quick specs:Linux (Crux 0.9.3)Tcl/Tk 8.4b1Python 2.2.1 (installed and working ok)GCC 2.95.3I've compiled the Imaging core library (libImaging.a) without a problem,I then run 'python setup.py build' and I get the following error:---&snip&---gcc -DNDEBUG -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging-I/usr/include/python2.2 -c _imagingtk.c -obuild/temp.linux-i686-2.2/_imagingtk.o -O2 -march=i686 -pipegcc -DNDEBUG -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging-I/usr/include/python2.2 -c Tk/tkImaging.c -obuild/temp.linux-i686-2.2/tkImaging.o -O2 -march=i686 -pipeTk/tkImaging.c: In function `PyImagingPhoto':Tk/tkImaging.c:165: too few arguments to function `Tk_PhotoPutBlock'Tk/tkImaging.c:175: too few arguments to function `Tk_PhotoPutBlock'Tk/tkImaging.c:182: too few arguments to function `Tk_PhotoPutBlock'error: command 'gcc' failed with exit status 1---&snip&---Attempting to build the modules by hand (make -f Makefile.pre.inmake) gets the same message. Obviously, I've got somethingmisconfigured/broke. I understand the error message ok, just not quitesure how to resolve it. Does PIL not support Tcl/Tk 8.4?Thanks for any information you can send.StevenFrom
Thu Aug 22 09:15:31 2002From:
(Josh Levenberg)Date: Thu, 22 Aug :31 -0700Subject: [Image-SIG] PILdriverMessage-ID: &3D649DA3.&This is a multi-part message in MIME format.--Boundary_(ID_KzB0J+GTafxUWrQENTWj1w)Content-type: text/ charset=us- format=flowedContent-transfer-encoding: 7BITI've been playing with the PILdriver recently, and have made someenhancements and bug fixes.Ported to newer PIL 1.1.3 (resize, offset)Added autocontrast, ..., solarize from ImageOpsAlso resize2 with a specified methodAdded help facility to print usage(I can get rid of Python 2-isms if needed (startswith,endswith, list comprehensions, string methods))Fixed bug in image attribute functions (pop-&do_pop)Fixed bug in paste (paste does not return an image, so None endedup on the stack)Corrected usage for ImageEnhance functions, plus other minor usagefixupsI've attached the modified version.Please CC me in discussions as I'm not subscribed to this list.--Josh Levenberg--Boundary_(ID_KzB0J+GTafxUWrQENTWj1w)Content-type: text/ name=pildriverJ.pyContent-transfer-encoding: 7BITContent-disposition: filename=pildriverJ.py#!/usr/bin/env python&&&PILdriver, an image-processing calculator using PIL.An instance of class PILDriver is essentially a software stack machine(Polish-notation interpreter) for sequencing PIL imagetransformations.
The state of the instance is the interpreter stack.The only method one will normally invoke after initialization is the`execute' method.
This takes an argument list of tokens, pushes themonto the instance's stack, and then tries to clear the stack bysuccessive evaluation of PILdriver operators.
Any part of the stacknot cleaned off persists and is part of the evaluation context forthe next call of the execute method.PILDriver doesn't catch any exceptions, on the theory that theseare actually diagnostic information that should be interpreted bythe calling code.When called as a script, the command-line arguments are passed toa PILDriver instance.
If there are no command-line arguments, themodule runs an interactive interpreter, each line of which is split intospace-separated tokens and passed to the execute method.In the method descriptions below, a first line beginning with the string`usage:' means this method can be invoked with the token that followsit.
Following &&-enclosed arguments describe how the method interpretsthe entries on the stack.
Each argument specification begins with atype specification: either `int', `float', `string', or `image'.All operations consume their arguments off the stack (use `dup' tokeep copies around).
Use `verbose 1' to see the stack state displayedbefore each operation.Usage examples:`show crop 0 0 200 300 open test.png' loads test.png, crops out a portionof its upper-left-hand corner and displays the cropped portion.`save rotated.png rotate 30 open test.tiff' loads test.tiff, rotates it30 degrees, and saves the result as rotated.png (in PNG format).Update August 21, 2002:Ported to newer PIL 1.1.3 (resize, offset)Added autocontrast, ..., solarize from ImageOpsAlso resize2 with a specified methodAdded help facility to print usage(I can get rid of Python 2-isms if needed (startswith,endswith, list comprehensions, string methods))Fixed bug in image attribute functions (pop-&do_pop)Fixed bug in paste (paste does not return an image, so None ended up on the stack)Corrected usage for ImageEnhance functions, plus other minor usage fixups-- Josh Levenberg&&&# by Eric S. Raymond &&# $Id: //modules/pil/Scripts/pildriver.py#3 $# TO DO:# 1. Add PILFont capabilities, once that's documented.# 2. Add PILDraw operations.# 3. Add support for composing and decomposing multiple-image files.#import Image, stringclass PILDriver:verbose = 0def do_verbose(self):&&&usage: verbose &int:num&Set verbosity flag from top of stack.&&&self.verbose = self.do_pop()# The evaluation stack (internal only)stack = []
# Stack of pending operationsdef push(self, item):&Push an argument onto the evaluation stack.&self.stack = [item] + self.stackdef top(self):&Return the top-of-stack element.&return self.stack[0]# Stack manipulation (callable)def do_clear(self):&&&usage: clearClear the stack.&&&self.stack = []def do_pop(self):&&&usage: popDiscard the top element on the stack.&&&top = self.stack[0]self.stack = self.stack[1:]return topdef do_dup(self):&&&usage: dupDuplicate the top-of-stack item.&&&if hasattr(self, 'format'):
# If it's an image, do a real copydup = self.stack[0].copy()else:dup = self.stack[0]self.stack = [dup] + self.stackdef do_swap(self):&&&usage: swapSwap the top-of-stack item with the next one down.&&&self.stack = [self.stack[1], self.stack[0]] + self.stack[2:]# Image module functions (callable)def do_new(self):&&&usage: new &int:xsize& &int:ysize& &int:color&Create and push a greyscale image of given size and color.&&&xsize = int(self.do_pop())ysize = int(self.do_pop())color = int(self.do_pop())self.push(Image.new(&L&, (xsize, ysize), color))def do_open(self):&&&usage: open &string:filename&Open the indicated image, read it, push the image on the stack.&&&self.push(Image.open(self.do_pop()))def do_blend(self):&&&usage: blend &image:pic1& &image:pic2& &float:alpha&Replace two images and an alpha with the blended image.&&&image1 = self.do_pop()image2 = self.do_pop()alpha = float(self.do_pop())self.push(Image.blend(image1, image2, alpha))def do_composite(self):&&&usage: composite &image:pic1& &image:pic2& &image:mask&Replace two images and a mask with their composite.&&&image1 = self.do_pop()image2 = self.do_pop()mask = self.do_pop()self.posite(image1, image2, mask))def do_merge(self):&&&usage: merge &string:mode& &image:pic1& [&image:pic2& [&image:pic3& [&image:pic4&]]]Merge top-of stack images in a way described by the mode.&&&mode = self.do_pop()bandlist = []for band in mode:bandlist.append(self.do_pop())self.push(Image.merge(mode, bandlist))# Image class methodsdef do_convert(self):&&&usage: convert &string:mode& &image:pic1&Convert the top image to the given mode.&&&mode = self.do_pop()image = self.do_pop()self.push(image.convert(mode))def do_copy(self):&&&usage: copy &image:pic1&Make and push a true copy of the top image.&&&self.dup()def do_crop(self):&&&usage: crop &int:left& &int:upper& &int:right& &int:lower& &image:pic1&Crop and push a rectangular region from the current image.&&&left = int(self.do_pop())upper = int(self.do_pop())right = int(self.do_pop())lower = int(self.do_pop())image = self.do_pop()self.push(image.crop((left, upper, right, lower)))def do_draft(self):&&&usage: draft &string:mode& &int:xsize& &int:ysize&Configure the loader for a given mode and size.&&&mode = self.do_pop()xsize = int(self.do_pop())ysize = int(self.do_pop())self.push(self.draft(mode, (xsize, ysize)))def do_filter(self):&&&usage: filter &string:filtername& &image:pic1&Process the top image with the given filter.&&&import ImageFilterfilter = eval(&ImageFilter.& + string.upper(self.do_pop()))image = self.do_pop()self.push(image.filter(filter))def do_getbbox(self):&&&usage: getbbox &image:pic1&Push left, upper, right, and lower pixel coordinates of the top image.&&&bounding_box = self.do_pop().getbbox()self.push(bounding_box[3])self.push(bounding_box[2])self.push(bounding_box[1])self.push(bounding_box[0])def do_getextrema(self):&&&usage: extrema &image:pic1&Push minimum and maximum pixel values of the top image.&&&extrema = self.do_pop().extrema()self.push(extrema[1])self.push(extrema[0])def do_paste(self):&&&usage: paste &image:figure& &int:xoffset& &int:yoffset& &image:ground&Paste figure image into ground with upper left at given offsets.&&&figure = self.do_pop()xoff = int(self.do_pop())yoff = int(self.do_pop())ground = self.do_pop()if figure.mode == &RGBA&:ground.paste(figure, (xoff, yoff), figure)else:ground.paste(figure, (xoff, yoff))self.push(ground)def do_resize(self):&&&usage: resize &int:xsize& &int:ysize& &image:pic1&Resize the top image.&&&xsize = int(self.do_pop())ysize = int(self.do_pop())image = self.do_pop()self.push(image.resize((xsize, ysize)))def do_resize2(self):&&&usage: resize2 &int:xsize& &int:ysize& &string:method& &image:pic1&Resize the top image.
Method can be one of: nearest, bilinear, bicubic,antialias.&&&xsize = int(self.do_pop())ysize = int(self.do_pop())method = eval(&Image.& + string.upper(self.do_pop()))image = self.do_pop()self.push(image.resize((xsize, ysize), method))def do_rotate(self):&&&usage: rotate &int:angle& &image:pic1&Rotate image through a given angle&&&angle = int(self.do_pop())image = self.do_pop()self.push(image.rotate(angle))def do_save(self):&&&usage: save &string:filename& &image:pic1&Save image with default options.&&&filename = self.do_pop()image = self.do_pop()image.save(filename)def do_save2(self):&&&usage: save2 &string:filename& &string:options& &image:pic1&Save image with specified options.&&&filename = self.do_pop()options = self.do_pop()image = self.do_pop()image.save(filename, None, options)def do_show(self):&&&usage: show &image:pic1&Display and pop the top image.&&&self.do_pop().show()def do_thumbnail(self):&&&usage: thumbnail &int:xsize& &int:ysize& &image:pic1&Modify the top image in the stack to contain a thumbnail of itself.&&&ysize = int(self.do_pop())xsize = int(self.do_pop())self.top().thumbnail((xsize, ysize))def do_transpose(self):&&&usage: transpose &string:operator& &image:pic1&Transpose the top image.&&&transpose = string.upper(self.do_pop())image = self.do_pop()self.push(image.transpose(transpose))# Image attributesdef do_format(self):&&&usage: format &image:pic1&Push the format of the top image onto the stack.&&&self.push(self.do_pop().format)def do_mode(self):&&&usage: mode &image:pic1&Push the mode of the top image onto the stack.&&&self.push(self.do_pop().mode)def do_size(self):&&&usage: size &image:pic1&Push the image size on the stack as (x, y).&&&size = self.do_pop().sizeself.push(size[1])self.push(size[0])# ImageChops operationsdef do_invert(self):&&&usage: invert &image:pic1&Invert the top image.&&&import ImageChopsself.push(ImageChops.invert(self.do_pop()))def do_lighter(self):&&&usage: lighter &image:pic1& &image:pic2&Pop the two top images, push an image of the lighter pixels of both.&&&import ImageChopsimage1 = self.do_pop()image2 = self.do_pop()self.push(ImageChops.lighter(image1, image2))def do_darker(self):&&&usage: darker &image:pic1& &image:pic2&Pop the two top images, push an image of the darker pixels of both.&&&import ImageChopsimage1 = self.do_pop()image2 = self.do_pop()self.push(ImageChops.darker(image1, image2))def do_difference(self):&&&usage: difference &image:pic1& &image:pic2&Pop the two top images, push the difference image&&&import ImageChopsimage1 = self.do_pop()image2 = self.do_pop()self.push(ImageChops.difference(image1, image2))def do_multiply(self):&&&usage: multiply &image:pic1& &image:pic2&Pop the two top images, push the multiplication image.&&&import ImageChopsimage1 = self.do_pop()image2 = self.do_pop()self.push(ImageChops.multiply(image1, image2))def do_offset(self):&&&usage: offset &int:xoffset& &int:yoffset& &image:pic1&Offset the pixels in the top image.&&&import ImageChopsxoff = int(self.do_pop())yoff = int(self.do_pop())image = self.do_pop()self.push(ImageChops.offset(image, xoff, yoff))def do_screen(self):&&&usage: screen &image:pic1& &image:pic2&Pop the two top images, superimpose their inverted versions.&&&import ImageChopsimage2 = self.do_pop()image1 = self.do_pop()self.push(ImageChops.screen(image1, image2))def do_add(self):&&&usage: add &image:pic1& &image:pic2& &int:offset& &float:scale&Pop the two top images, produce the scaled sum with offset.&&&import ImageChopsimage1 = self.do_pop()image2 = self.do_pop()scale = float(self.do_pop())offset = int(self.do_pop())self.push(ImageChops.add(image1, image2, scale, offset))def do_subtract(self):&&&usage: subtract &image:pic1& &image:pic2& &int:offset& &float:scale&Pop the two top images, produce the scaled difference with offset.&&&import ImageChopsimage1 = self.do_pop()image2 = self.do_pop()scale = float(self.do_pop())offset = int(self.do_pop())self.push(ImageChops.subtract(image1, image2, scale, offset))# ImageEnhance classesdef do_color(self):&&&usage: color &float:factor& &image:pic1&Enhance color in the top image.&&&import ImageEnhancefactor = float(self.do_pop())image = self.do_pop()enhancer = ImageEnhance.Color(image)self.push(enhancer.enhance(factor))def do_contrast(self):&&&usage: contrast &float:factor& &image:pic1&Enhance contrast in the top image.&&&import ImageEnhancefactor = float(self.do_pop())image = self.do_pop()enhancer = ImageEnhance.Color(image)self.push(enhancer.enhance(factor))def do_brightness(self):&&&usage: brightness &float:factor& &image:pic1&Enhance brightness in the top image.&&&import ImageEnhancefactor = float(self.do_pop())image = self.do_pop()enhancer = ImageEnhance.Color(image)self.push(enhancer.enhance(factor))def do_sharpness(self):&&&usage: sharpness &float:factor& &image:pic1&Enhance sharpness in the top image.&&&import ImageEnhancefactor = float(self.do_pop())image = self.do_pop()enhancer = ImageEnhance.Color(image)self.push(enhancer.enhance(factor))# ImageOps functionsdef do_autocontrast(self):&&&usage: autocontrast &image:pic1&Maximize image contrast. Remaps the image so that the darkestpixel becomes black (0), and the lightest becomes white (255).&&&import ImageOpsimage = self.do_pop()self.push(ImageOps.autocontrast(image))def do_autocontrast2(self):&&&usage: autocontrast2 &float:cutoff& &image:pic1&Maximize image contrast.
Calculates a histogram of the input image,removes cutoff percent of the lightest and darkest pixels from thehistogram, and remaps the image so that the darkest pixel becomesblack (0), and the lightest becomes white (255).&&&import ImageOpscutoff = float(self.do_pop())image = self.do_pop()self.push(ImageOps.autocontrast(image, cutoff))def do_colorize(self):&&&usage: colorize &int:k_r& &int:k_g& &int:k_b& &int:w_r& &int:w_g& &int:w_b& &image:pic1&Colorize grayscale image. This function calculates a colour wedge mapping all blackpixels in the source image to the (k_r, k_g, k_b), and all white pixels to(w_r, w_g, w_b).&&&import ImageOpsk_r = int(self.do_pop())k_g = int(self.do_pop())k_b = int(self.do_pop())w_r = int(self.do_pop())w_g = int(self.do_pop())w_b = int(self.do_pop())image = self.do_pop()self.push(ImageOps.colorize(image, (k_r, k_g, k_b), (w_r, w_g, w_b)))def do_cropall(self):&&&usage: cropall &int:border& &image:pic1&Remove border pixels from all four edges.&&&import ImageOpsborder = int(self.do_pop())image = self.do_pop()self.push(ImageOps.crop(image, border))def do_equalize(self):&&&usage: equalize &image:pic1&Equalize the image histogram. This function applies a non-linearmapping to the input image, in order to create a uniform distributionof grayscale values in the output image.&&&import ImageOpsimage = self.do_pop()self.push(ImageOps.equalize(image))def do_fit(self):&&&usage: fit &int:wid& &int:hi& &string:method& &float:bleed& &float:cen_x& &float:cen_y& &image:pic1&Returns a sized and cropped version of the image, cropped to therequested aspect ratio and size. The (wid,hi) argument is the requestedoutput size in pixels.The method argument is what resampling method to use: one of nearest,bilinear, bicubic, antialias.The bleed argument allows you to remove a border around the outsidethe image (from all four edges). The value is a decimal percentage (use0.01 for one percent). The value 0 is no border.The centering argument is used to control the cropping position. (0.5,0.5) is center cropping (i.e. if cropping the width, take 50% off of theleft side (and therefore 50% off the right side), and same withtop/bottom).(0.0, 0.0) will crop from the top left corner (i.e. if cropping the width,take all of the crop off of the right side, and if cropping the height,take all of it off the bottom).(1.0, 0.0) will crop from the bottom left corner, etc. (i.e. if croppingthe width, take all of the crop off the left side, and if cropping theheight take none from the top (and therefore all off the bottom)).&&&import ImageOpswidth = int(self.do_pop())height = int(self.do_pop())method = eval(&Image.& + string.upper(self.do_pop()))bleed = float(self.do_pop())image = self.do_pop()self.push(ImageOps.posterize(image, bits))def do_posterize(self):&&&usage: posterize &int:bits& &image:pic1&Reduce the number of bits for each colour channel.&&&import ImageOpsbits = int(self.do_pop())image = self.do_pop()self.push(ImageOps.posterize(image, bits))def do_solarize(self):&&&usage: solarize &int:threshold& &image:pic1&Invert all pixel values above the given threshold.&&&import ImageOpsthreshold = int(self.do_pop())image = self.do_pop()self.push(ImageOps.solarize(image, threshold))# help/usage facillitydef do_help(self):&&&usage: helpGives a list of commands.&&&command_list = [ key[3:] for key in self.__class__.__dict__.keys() if key.startswith('do_') ]command_list.sort()print '''Try 'usage &command&' where command is one of:'''print ', '.join(command_list)def do_usage(self):&&&usage: usage &&string:command&&Give usage for command.
Command should be enclosed in quotes.&&&command=self.do_pop()if command.endswith('&'): command=command[:-1]if command.endswith(&'&): command=command[:-1]if command.startswith('&'): command=command[1:]if command.startswith(&'&): command=command[1:]funcname = &do_&+commandif hasattr(self, funcname):print getattr(self, funcname).__doc__else:print &Unrecognized command&,command# The interpreter loopdef execute(self, list):&Interpret a list of PILDriver commands.&list.reverse()while len(list) & 0:self.push(list[0])list = list[1:]if self.verbose:print &Stack: & + `self.stack`top = self.top()if type(top) != type(&&):funcname = &do_& + topif not hasattr(self, funcname):continueelse:self.do_pop()func = getattr(self, funcname)func()if __name__ == '__main__':import systry:import readlineexcept ImportError:pass # not available on all platforms# If we see command-line arguments, interpret them as a stack state# and execute.
Otherwise go interactive.driver = PILDriver()if len(sys.argv[1:]) & 0:driver.execute(sys.argv[1:])else:print &PILDriver says hello.&while 1:try:line = raw_input('pildriver& ');except EOFError:print &\nPILDriver says goodbye.&breakdriver.execute(string.split(line))print driver.stack# The following sets edit modes for GNU EMACS# Local Variables:# mode:python# End:--Boundary_(ID_KzB0J+GTafxUWrQENTWj1w)--From
Thu Aug 22 09:18:22 2002From:
(Josh Levenberg)Date: Thu, 22 Aug :22 -0700Subject: [Image-SIG] Bug in ImageOps.equalizeMessage-ID: &3D649E4E.&It complains about &operator.add& if you run equalize on an image.Fix is simple: add &import operator& to the top of the file&ImageOps.py&, or to just the function equalize.--Josh LevenbergFrom
Thu Aug 22 09:23:12 2002From:
(Josh Levenberg)Date: Thu, 22 Aug :12 -0700Subject: [Image-SIG] Feature request: Median filterMessage-ID: &3D649F70.&I've tried several python implementations of a median filter.
So far myfastest (included below) is still quite slow (it takes minutes ratherthan seconds).
Is there a way of speeding this up?
Is there going tobe a median filter included in future versions of PIL?Thanks!def MedianOnString(imstr, imsize, kernelsize):(width,height) = imsizerows=[imstr[row*width:(row+1)*width] for row in range(height)]retrows=['']*heightfor x in range(width):sys.stdout.write('.')mnx = max(x-kernelsize, 0)mxx = min(x+kernelsize+1, width)window=[]for y in range(min(kernelsize+1, height)):window.append(rows[y][mnx:mxx])for y in range(height):if y&kernelsize:# remove first row from windowdel window[0]if y+kernelsize&height:# add last row to windowwindow.append(rows[y+kernelsize][mnx:mxx])lst=list(''.join(window))lst.sort()retrows[y]= retrows[y]+lst[len(lst)/2]sys.stdout.write('\n')return ''.join(retrows)def MedianFilter(im, kernelsize):imagedata=[MedianOnString(impart.tostring(), im.size, kernelsize)for impart in im.split()]return Image.merge('RGB', [Image.fromstring('L', im.size, imstring)for imstring in imagedata])--Josh LevenbergFrom Schutte@fel.tno.nl
Wed Aug 21 22:07:13 2002From: Schutte@fel.tno.nl (Klamer Schutte)Date: Wed, 21 Aug :13 +0200Subject: [Image-SIG] Reading 16bit imageReferences: &.rcati@cenpra.gov.br& &a3.97.92.109]& &3D5E1601.94ECE332@fel.tno.nl&Message-ID: &3DCA72B0@fel.tno.nl&This is a multi-part message in MIME format.--------------76ACC229A5F70Content-Type: text/ charset=us-asciiContent-Transfer-Encoding: 7bitWith regard to 16 bit TIFF support:Please find attached- diffs for Imaging-1.1.3- changes sources of Imaging-1.1.3The changes sources are for when you don't have/ in thatcaes just replace the source files. O recompileand re-install Imaging-1.1.3.What is changed in the sources:- ability to read 16 bit unsigned TIFF files using Image.open- ability to use Image.show (by adding convert to 'L' mode (uint8))- ability to use Image.getextrema and Image.pointImage.show, Image.getextrema and Image.point all work similar tothe 32 so something like:import Imageim16 = Image.open('img.tif')min,max = im16.getextrema()scale = 255.0 / (max - min)offset = - min * scaleim16c = im16.point(lambda i: i * scale + offset)im16c.show()will show a strechted image (sorry, typed from memory).Other PIL functions are not (yet ?) converted for 16 int use.Note that im16.convert('I') will give a 32 bit int image, which isbetter supported in PIL; or use im16c.convert('L') and have an 8 bitimage.Feedback is appreciated!Klamer SchutteSchutte@fel.tno.nlKlamer Schutte wrote:Aureli Soria Frisch wrote:I submitted a while ago a question related to the possibility ofopening TIF files with 16 bit depth that remained with no answer...It would be interesting to know how to work with 16 bit files in PILin general (it does not seem to be possible with the open sourceversion of PIL)...--------------76ACC229A5F70Content-Type: text/ charset=us-name=&diffs.txt&Content-Transfer-Encoding: 7bitContent-Disposition:filename=&diffs.txt&diff -cr Imaging-1.1.3/PIL/Image.py Imaging-1.1.3-KS/PIL/Image.py*** Imaging-1.1.3/PIL/Image.py Thu Mar 14 20:55:04 2002--- Imaging-1.1.3-KS/PIL/Image.py Wed Aug 21 22:09:57 2002****************** 1,6 ****## The Python Imaging Library.! # $Id: //modules/pil/PIL/Image.py#17 $## the Image class wrapper#--- 1,6 ----## The Python Imaging Library.! # $Id: Image.py,v 1.2
20:09:19 klamer Exp $## the Image class wrapper#****************** 145,150 ****--- 145,151 ----# official modes&1&: (&L&, &L&, (&1&,)),&L&: (&L&, &L&, (&L&,)),+
&I;16& : (&L&, &I;16&, (&I;16&,)),&I&: (&L&, &I&, (&I&,)),&F&: (&L&, &F&, (&F&,)),&P&: (&RGB&, &L&, (&P&,)),****************** 625,631 ****def point(self, lut, mode=None):&Map image through lookup table&!
if self.mode in (&I&, &F&):# lut must be a valid expressionscale, offset = _getscaleoffset(lut)self.load()--- 626,632 ----def point(self, lut, mode=None):&Map image through lookup table&!
if self.mode in (&I&, &I;16&, &F&):# lut must be a valid expressionscale, offset = _getscaleoffset(lut)self.load()diff -cr Imaging-1.1.3/PIL/TiffImagePlugin.py Imaging-1.1.3-KS/PIL/TiffImagePlugin.py*** Imaging-1.1.3/PIL/TiffImagePlugin.py Sun Mar 10 17:57:39 2002--- Imaging-1.1.3-KS/PIL/TiffImagePlugin.py Wed Aug 21 22:12:37 2002****************** 1,6 ****## The Python Imaging Library.! # $Id: //modules/pil/PIL/TiffImagePlugin.py#5 $## TIFF file handling#--- 1,6 ----## The Python Imaging Library.! # $Id: TiffImagePlugin.py,v 1.1
20:11:01 klamer Exp $## TIFF file handling#****************** 106,112 ****(0, 1, (8,), ()): (&L&, &L;I&),(1, 1, (1,), ()): (&1&, &1&),(1, 1, (8,), ()): (&L&, &L&),!
(1, 2, (16,), ()): (&I;16&, &I;16&),(1, 2, (32,), ()): (&I&, &I;32S&),(1, 3, (32,), ()): (&F&, &F;32F&),(2, 1, (8,8,8), ()): (&RGB&, &RGB&),--- 106,113 ----(0, 1, (8,), ()): (&L&, &L;I&),(1, 1, (1,), ()): (&1&, &1&),(1, 1, (8,), ()): (&L&, &L&),!
(1, 1, (16,), ()): (&I;16&, &I;16&),!
(1, 2, (16,), ()): (&I;16S&, &I;16S&),(1, 2, (32,), ()): (&I&, &I;32S&),(1, 3, (32,), ()): (&F&, &F;32F&),(2, 1, (8,8,8), ()): (&RGB&, &RGB&),****************** 331,336 ****--- 332,338 ----elif tag in (X_RESOLUTION, Y_RESOLUTION):# identify rational data fieldstyp = 5+
continueelse:typ = 3for v in value:****************** 568,574 ****&L&: (&L&, 1, 1, (8,), None),&P&: (&P&, 3, 1, (8,), None),&I&: (&I;32S&, 1, 2, (32,), None),!
&I;16&: (&I;16&, 1, 2, (16,), None),&F&: (&F;32F&, 1, 3, (32,), None),&RGB&: (&RGB&, 2, 1, (8,8,8), None),&RGBX&: (&RGBX&, 2, 1, (8,8,8,8), 0),--- 570,577 ----&L&: (&L&, 1, 1, (8,), None),&P&: (&P&, 3, 1, (8,), None),&I&: (&I;32S&, 1, 2, (32,), None),!
&I;16&: (&I;16&, 1, 1, (16,), None),!
&I;16S&: (&I;16S&, 1, 2, (16,), None),&F&: (&F;32F&, 1, 3, (32,), None),&RGB&: (&RGB&, 2, 1, (8,8,8), None),&RGBX&: (&RGBX&, 2, 1, (8,8,8,8), 0),diff -cr Imaging-1.1.3/_imaging.c Imaging-1.1.3-KS/_imaging.c*** Imaging-1.1.3/_imaging.c Sun Mar 10 17:57:40 2002--- Imaging-1.1.3-KS/_imaging.c Wed Aug 21 22:13:16 2002****************** 1,6 ****/** The Python Imaging Library.!
* $Id: //modules/pil/_imaging.c#11 $** the imaging library bindings*--- 1,6 ----/** The Python Imaging Library.!
* $Id: _imaging.c,v 1.1
20:13:00 klamer Exp $** the imaging library bindings*******************
----union {UINT8 u[2];INT32 i[2];+
UINT16 i16[2];FLOAT32 f[2];}******************
----return Py_BuildValue(&ii&, extrema.i[0], extrema.i[1]);case 2:return Py_BuildValue(&dd&, extrema.f[0], extrema.f[1]);+
if (strcmp(self-&image-&mode, &I;16&) == 0)+
return Py_BuildValue(&ii&, extrema.i16[0], extrema.i16[1]);}Py_INCREF(Py_None);diff -cr Imaging-1.1.3/libImaging/Convert.c Imaging-1.1.3-KS/libImaging/Convert.c*** Imaging-1.1.3/libImaging/Convert.c Sun Mar 10 17:57:40 2002--- Imaging-1.1.3-KS/libImaging/Convert.c Wed Aug 21 22:14:10 2002****************** 1,6 ****/** The Python Imaging Library!
* $Id: //modules/pil/libImaging/Convert.c#3 $** convert images*--- 1,6 ----/** The Python Imaging Library!
* $Id: Convert.c,v 1.1
20:13:39 klamer Exp $** convert images******************* 408,413 ****--- 408,423 ----}static void+ l2i16(UINT8* out, const UINT8* in, int xsize)+ {++
for (x = 0; x & x++, in++) {+
*out++ = *+
*out++ = 0;+
}+ }++ static voidi2i16b(UINT8* out, const UINT8* in_, int xsize){int x,****************** 429,434 ****--- 439,455 ----}static void+ i162l(UINT8* out, const UINT8* in, int xsize)+ {++
for (x = 0; x & x++, in += 2)+
if (in[1] != 0)+
*out++ = 255;+
*out++ = in[0];+ }++ static voidi16b2i(UINT8* out_, const UINT8* in, int xsize){****************** 510,515 ****--- 531,539 ----{ &I&, &I;16B&, i2i16b },{ &I;16B&, &I&, i16b2i },+
{ &L&, &I;16&, l2i16 },+
{ &I;16&, &L&, i162l },+{ NULL }};****************** 905,911 ****--- 929,943 ----}if (!convert)+ #ifdef notdefreturn (Imaging) ImagingError_ValueError(&conversion not supported&);+ #else+
static char buf[256];+
sprintf(buf, &conversion from %s to %s not supported&, imIn-&mode, mode);+
return (Imaging) ImagingError_ValueError(buf);+
}+ #endifimOut = ImagingNew2(mode, imOut, imIn);if (!imOut)diff -cr Imaging-1.1.3/libImaging/GetBBox.c Imaging-1.1.3-KS/libImaging/GetBBox.c*** Imaging-1.1.3/libImaging/GetBBox.c Sun Mar 10 17:57:40 2002--- Imaging-1.1.3-KS/libImaging/GetBBox.c Wed Aug 21 22:14:59 2002****************** 1,6 ****/** The Python Imaging Library!
* $Id: //modules/pil/libImaging/GetBBox.c#2 $** get bounding box for image*--- 1,6 ----/** The Python Imaging Library!
* $Id: GetBBox.c,v 1.1
20:14:29 klamer Exp $** get bounding box for image******************* 163,168 ****--- 163,186 ----((FLOAT32*) extrema)[0] =((FLOAT32*) extrema)[1] =+
case IMAGING_TYPE_SPECIAL:+
if (strcmp(im-&mode,&I;16&) == 0)+
imin = imax = ((UINT16*)im-&image8[0])[0];+
for (y = 0; y & im-& y++) {+
UINT16* in = (UINT16 *)im-&image[y];+
for (x = 0; x & im-& x++) {+
if (imin & in[x])+
imin = in[x];+
else if (imax & in[x])+
imax = in[x];+
((UINT16*) extrema)[0] = (UINT16)+
((UINT16*) extrema)[1] = (UINT16)+
/* FALL THROUGH */default:ImagingError_ModeError();return -1;diff -cr Imaging-1.1.3/libImaging/Point.c Imaging-1.1.3-KS/libImaging/Point.c*** Imaging-1.1.3/libImaging/Point.c Sun Mar 10 17:57:40 2002--- Imaging-1.1.3-KS/libImaging/Point.c Wed Aug 21 22:15:51 2002****************** 1,6 ****/** The Python Imaging Library!
* $Id: //modules/pil/libImaging/Point.c#2 $** point (pixel) translation*--- 1,6 ----/** The Python Imaging Library!
* $Id: Point.c,v 1.1
20:15:22 klamer Exp $** point (pixel) translation******************* 113,119 ****Imaging imOint x,!
if (!imIn || strcmp(imIn-&mode, &I&) != 0 && strcmp(imIn-&mode, &F&) != 0)return (Imaging) ImagingError_ModeError();imOut = ImagingNew(imIn-&mode, imIn-&xsize, imIn-&ysize);--- 113,121 ----Imaging imOint x,!
if (!imIn || (strcmp(imIn-&mode, &I&) != 0) &&!
(strcmp(imIn-&mode, &I;16&) != 0) &&!
(strcmp(imIn-&mode, &F&) != 0))return (Imaging) ImagingError_ModeError();imOut = ImagingNew(imIn-&mode, imIn-&xsize, imIn-&ysize);****************** 140,145 ****--- 142,160 ----out[x] = in[x] * scale +}+
case IMAGING_TYPE_SPECIAL:+
if (strcmp(imIn-&mode

我要回帖

更多关于 42pfl3168 t3 的文章

 

随机推荐