From chase@gps16.llnl.gov Sat Feb 1 01:57:20 2003 From: chase@gps16.llnl.gov (Lila Chase) Date: Fri, 31 Jan 2003 17:57:20 -0800 (PST) Subject: [Image-SIG] Python Imaging Library Handbook for 1.1.3 (PDF) Message-ID: <200302010157.RAA112491@gps16.llnl.gov> Hello, I get permission denied when I tried to access this document on http://www.pythonware.com/products/pil/index.htm. Thanks, Lila Chase lchase@llnl.gov From b.n.lawrence@rl.ac.uk Sun Feb 2 18:28:31 2003 From: b.n.lawrence@rl.ac.uk (Bryan Lawrence) Date: Sun, 2 Feb 2003 18:28:31 +0000 Subject: [Image-SIG] Aliasing problem using PIL .. Message-ID: <200302021828.31701.b.n.lawrence@rl.ac.uk> Hi Folks I'm a novice at this stuff, and was playing at producing a tool for making photo-albums (yes I know there are plenty out there, but I wanted to do it for myself) ... anyway, the following piece of code works but doesn't give the quality of results i expected. Basically what I want to do is embed images on a page at various places and with various sizes. Sounds easy. When I do this the output looks terrible. In the example below the tmp.jpg file looks fine, but the bad.jpg file looks terrible - whether on the screen or after printing. import Image outsize=4800,6600 #make a blank white image which should be ok at 300 dpi on A4 #I figured on having enough pixels so that there should be no #interpolation required. NB printer is hp psc2115 on linux output=Image.new('RGB',outsize,(255,255,255)) #tmp.jpg is 1310x1310 ... panel_member=Image.open('tmp.jpg') #embed tmp.jpg as a small picture near the top right of the page output.paste(panel_member,(250,250)) output.save('bad.jpg') I'd be happy to supply an example jpg if anyone wants to try this ... I suspect I'm doing something stupid ... can anyone tell me what? Apologies in advance if this is the wrong place for this query, if so can you please tell me the right place. I'm not on the mailing list, so could you please copy me any replies! Thanks in advance, Bryan From brandon@oit.gatech.edu Sun Feb 2 19:35:19 2003 From: brandon@oit.gatech.edu (Brandon Craig Rhodes) Date: 02 Feb 2003 14:35:19 -0500 Subject: [Image-SIG] Aliasing problem using PIL .. In-Reply-To: <200302021828.31701.b.n.lawrence@rl.ac.uk> References: <200302021828.31701.b.n.lawrence@rl.ac.uk> Message-ID: Bryan Lawrence writes: > anyway, the following piece of code works but doesn't give the > quality of results i expected. My results upon running it were to get the image, with its normal size and appearance, in the upper-left (not upper-right - my copy of PIL seems to count coordinates from the upper-left) of an absolutely enormous 4800x6600 canvas (well, enormous for my 1024x768 display). To view the large image I can either pan across it, which makes my image look normal-sized on the screen, or I can shrink the view to fit on my screen, in which case I see the image - quite appropriately - rather small and in the upper left corner. If you could provide for us the test image *and* the bad-looking output image you are getting, we could probably be of much more assistance to you. -- Brandon Craig Rhodes http://www.rhodesmill.org/brandon Georgia Tech brandon@oit.gatech.edu From b.n.lawrence@rl.ac.uk Mon Feb 3 09:12:03 2003 From: b.n.lawrence@rl.ac.uk (Bryan Lawrence) Date: Mon, 3 Feb 2003 09:12:03 +0000 Subject: [Image-SIG] Aliasing problem using PIL .. In-Reply-To: References: <200302021828.31701.b.n.lawrence@rl.ac.uk> Message-ID: <200302030912.03610.b.n.lawrence@rl.ac.uk> Hi Folks Isn't it amazing how sharing a problem immediately concentrates your mind? Firstly, Brandon is right, it's the top left, and that's what I wanted it to do, I just commented it for the list in a hurry ... wrongly ... In the process of putting the jpg files on a website in reply to Bradon's email and to avoid filling folks inboxes, I used something else to view the files, and discovered that the aliasing problem is not in the output image, but in a) the packages which squeeze the image up to fit on my display, and b) possibly, their printer drivers. (I had tried two different viewers ... obviously not enuff ...) So, after troubling you all, there is nothing wrong with the output of this programme, everything is wong with what I do next (or with the concept). Can I restate my (new) problem in two parts? Firstly, what i'm trying to do is produce an output image which loses as little as possible of the resolution of the input images, so I'm aiming to produce the output as close as possible to the desired print resolution. (That's why it's a 4800x6600 image, which ought to be 8 inches by 11 inches at 600 dpi - not 300 as I said in my badly commented snip of code). Does that make sense? Secondly, what's a sensible way of getting such an image to a printer with the minimum distortion introduced by an image display printer driver? Is there a good package under linux (suse 8.1). (Given that the target printer is a psc2115 using the hpoj/hpijs combination) Once again, apologies, I feel like these are rather trivial questions, but I'm new at this, and I don't know where else to ask. Thanks in advance, Bryan On Sunday 02 February 2003 19:35, Brandon Craig Rhodes wrote: > Bryan Lawrence writes: > > anyway, the following piece of code works but doesn't give the > > quality of results i expected. > > My results upon running it were to get the image, with its normal size > and appearance, in the upper-left (not upper-right - my copy of PIL > seems to count coordinates from the upper-left) of an absolutely > enormous 4800x6600 canvas (well, enormous for my 1024x768 display). > To view the large image I can either pan across it, which makes my > image look normal-sized on the screen, or I can shrink the view to fit > on my screen, in which case I see the image - quite appropriately - > rather small and in the upper left corner. > > If you could provide for us the test image *and* the bad-looking > output image you are getting, we could probably be of much more > assistance to you. From chase@storm.llnl.gov Mon Feb 3 17:39:09 2003 From: chase@storm.llnl.gov (chase3 Lila Chase 24086) Date: Mon, 3 Feb 2003 09:39:09 -0800 Subject: [Image-SIG] PIL & flat-field division Message-ID: <200302031739.JAA07172@storm.llnl.gov> How might I accomplish flat-field division with the current free version of PIL? Thanks, Lila Chase lchase@llnl.gov From b.n.lawrence@rl.ac.uk Mon Feb 3 21:07:45 2003 From: b.n.lawrence@rl.ac.uk (Bryan Lawrence) Date: Mon, 3 Feb 2003 21:07:45 +0000 Subject: [Image-SIG] Aliasing problem using PIL .. SOLVED In-Reply-To: References: <200302021828.31701.b.n.lawrence@rl.ac.uk> Message-ID: <200302032107.47154.b.n.lawrence@rl.ac.uk> Hi Brandon, Folks Ok, I've been wasting your time. When I used the Gimp, with an appropriate back end driver, it all works perfectly (I think I've stuffed up my gs installation as even pilprint produces unprintable postscript). Anyway, thanks to any of you who might have pondered my problems, and specific thanks to Brandon for trying it out for me. Just knowing it should have worked helped a lot! Bryan p.s For the record, my psc2115 works fine normally with the dj5550 driver in cups, but I needed to use the dj900series driver in gimp ... the psc2110 ppd file from linuxprint.org produced barmy postscript errors on the printer ... From fredrik@pythonware.com Wed Feb 5 10:34:45 2003 From: fredrik@pythonware.com (Fredrik Lundh) Date: Wed, 5 Feb 2003 11:34:45 +0100 Subject: [Image-SIG] Re: PIL & flat-field division References: <200302031739.JAA07172@storm.llnl.gov> Message-ID: Lila Chase wrote: > How might I accomplish flat-field division with the current > free version of PIL? I guess you could use Image.point to invert the flat field, and then use ImageChops.subtract and ImageChops.multiply. however, it's probably easier (and more flexible) to move the problem over to the numerical Python domain: http://effbot.org/zone/pil-numpy.htm regards /F From sarah" ------=_NextPart_000_00C0_64B88C7B.B2056A36 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 KiBSZWR1Y2UgdGhlIGFtb3VudCBvZiBzbGVlcCB5b3UgbmVlZA0KKiBDYXVz ZSB3b3VuZHMgdG8gaGVhbCBmYXN0ZXINCiogTG9zZSB3ZWlnaHQgd2hpbGUg eW91ciBzbGVlcGluZw0KKiBCZWNvbWUgbGVzcyB3aW5kZWQgd2hlbiBleGNl cnNpemluZw0KKiBQdXQgY29sb3IgYmFjayBpbiBncmV5IGhhaXINCiogR3Jv dyBoYWlyIGJhY2sgd2hlcmUgaXQgaGFkIG9uY2UgZmFsbGVuIG91dA0KKiBU aWdodGVuIHNraW4NCiogU3RyZW5ndGhlbiBib25lcw0KKiBCb2R5IGJ1aWxk ZXJzIC0gdXNlIHRoaXMgdG8gYnVpbGQgeW91ciBtdXNjbGVzIHF1aWNrZXIN Ci4uLi4uLi4uLi5UaGUgTGlzdCB0cnVseSBnb2VzIG9uIGFuZCBvbi4uLi4u Li4uLi4NCg0KQXMgc2VlbiBvbiBOQkMsIENCUywgQ05OLCBhbmQgT3ByYWgh IFRoZSBoZWFsdGggZGlzY292ZXJ5IA0KdGhhdCBhY3R1YWxseSByZXZlcnNl cyBhZ2luZyBzeW1wdG9tcyB3aXRob3V0IGRpZXRpbmcgb3IgZXhlcmNpc2Uh IA0KVGhpcyBQUk9WRU4gZGlzY292ZXJ5IGhhcyBiZWVuIHJlcG9ydGVkIG9u IGJ5IHRoZSANCk5ldyBFbmdsYW5kIEpvdXJuYWwgb2YgTWVkaWNpbmUgLSBk b24ndCBqdXN0IHRha2Ugb3VyIHdvcmQgZm9yIGl0Lg0KDQpJbiBmYWN0IHdl J2QgbGlrZSB5b3UgdG8gcmVjZWl2ZSBhIEYuUi5FLkUgdGhpcnR5IGRheSBz dXBwbHk7IGxvb2sgYW5kIGZlZWwgDQp5b3VuZ2VyLCBsb3NlIHdlaWdodCwg cmVkdWNlIHNsZWVwLCBUaGUgbGlzdCBnb2VzIG9uLCB3ZSANCmVuY291cmFn ZSB5b3UgdG8gYXQgbGVhc3QgdGFrZSBhIGxvb2sgYXQgdGhlIGluZm9ybWF0 aW9uIGFzIHRvDQp3aGF0IGVsc2UgaXQgY2FuIGRvDQoNCmh0dHA6Ly9oaWRk ZW4uY29tLm1zLXNjcmlwdC42NTE2ODUuOTg3MzY2MS0wMzMyMTk4NzYzNTEz NTMxODQxLmVuY29kZS44MzAzMTg1NDE4NDE0MjYwLmVsc2UuMTQwNTU4NjM3 MjAyNTg5NDYzMDIxNTUwNjM3MzIubXMvd3d3Lmdyb3d5b3VuZy5jb20vP2xp ZmVzDQoNCg0KMzMwNnluRHA2LTk4NG5UU2IxMjI0ZlliVDMtMzIyWmNObDMx From Peter Lasader Phd6" <6PLasadercb416@nycmail.com Fri Feb 7 00:30:05 2003 From: Peter Lasader Phd6" <6PLasadercb416@nycmail.com (Peter Lasader Phd6) Date: Thu, 06 Feb 2003 19:30:05 -0500 Subject: [Image-SIG] Order v_i a g r_a from home, no doctors! 6470Mmzw5-869qv-14 Message-ID: <005b44e33a2a$7533a1b2$3ab87cb4@rdtwyx> ------=_NextPart_000_00B3_03E22B0C.D3024A21 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: base64 SGVyZSBpcyB5b3VyIGNoYW5jZSB0byBza2lwIHRoZSBlbWJhcnJhc3Npbmcs IHRpbWUtY29uc3VtaW5nIHRhc2sgb2YgDQpnb2luZyB0byBkLm9jdG9yJ3Mg YXBwb2ludG1lbnRzIHRvIHRyeSBhbmQgZ2V0IHRoZSBwLnJlc2NyaXB0aW9u IHlvdSB3YW50LiANCldlJ3JlIHJlYWR5IHRvIEZlZGV4IHlvdXIgb25saW5l ICAgdl9pIGEgZyByX2EgICBwLnJlc2NyaXB0aW9uIG9yZGVycyByaWdodCBu b3chISENCg0KTm8gcC5yZXNjcmlwdGlvbiBuZWNlc3NhcnkhISEgSnVzdCB2 aXNpdCB0aGUgbGluayBiZWxvdyBhbmQgaGF2ZSB5b3VyIA0Kdl9pIGEgZyBy X2Egb24gaXRzIHdheSB0byB5b3UgdG9kYXkhISEgIA0KaHR0cDovL3d3dy5U cm9waWNhbFBpbGxzLmNvbS9tYWluMi5waHA/cng9MTcyODMNCg0KDQo5NjU3 QXZNbTctNTkwTGwxMw== From mt1_18@yahoo.com Fri Feb 7 08:49:13 2003 From: mt1_18@yahoo.com (Majid Tahir) Date: Fri, 7 Feb 2003 00:49:13 -0800 (PST) Subject: [Image-SIG] PIL jpeg decoder Message-ID: <20030207084913.85791.qmail@web41511.mail.yahoo.com> after a long and frustrating process I have finally fixed the problem with PIL not finding the jpeg decoder. I know that others have this problem as well at times so I will describe how I got it to work on Rh8.0 and Python 2.2.2 in libImaging directory edit the ImConfig.h header file. change undef HAVE_LIBJPEG to #define HAVE_LIBJPEG and uncomment ./configure --with-jpeg=/usr/local/lib make cd .. make -f Makefile.pre.in boot make ldconfig now test... python import Image import _imaging ok that works now test from command line python Minitest/test.py cp *.so /usr/local/lib/python2.2/site-packages/PIL cp PIL/* /usr/local/lib/python2.2/site-packages/PIL Thats it.. peace __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From majid@enoor.com Fri Feb 7 09:03:14 2003 From: majid@enoor.com (majid@enoor.com) Date: Fri, 07 Feb 2003 09:03:14 GMT Subject: [Image-SIG] PIL and JPEG decoder issues resolved once and for all Message-ID: <20030207090314.9220.qmail@mail.emigratus.com> after a long and frustrating process I have finally fixed the problem with PIL not finding the jpeg decoder. I know that others have this problem as well at times so I will describe how I got it to work on Rh8.0 and Python 2.2.2 in libImaging directory edit the ImConfig.h header file. change undef HAVE_LIBJPEG to #define HAVE_LIBJPEG and uncomment ./configure --with-jpeg=/usr/local/lib make cd .. make -f Makefile.pre.in boot make ldconfig now test... python import Image import _imaging ok that works now test from command line python Minitest/test.py that should work too....FINALLY cp *.so /usr/local/lib/python2.2/site-packages/PIL cp PIL/* /usr/local/lib/python2.2/site-packages/PIL DONT FORGET ldconfig :) Thats it.. peace From master@89894.com Tue Feb 11 04:37:09 2003 From: master@89894.com (½Å¿ë ö) Date: Tue, 11 Feb 2003 13:37:09 +0900 Subject: [Image-SIG] (no subject) Message-ID: <98760-220032211437993@89894.com>

=C1=A4=BA=B8=C5=EB=BD=C5=BA=CE =B1=C7=B0=ED =BB=E7=C7=D7=BF= =A1 =C0=C7=B0=C5 =C1=A6=B8=F1=BF=A1 [=B1=A4=B0=ED]=B6=F3=B0=ED =C7=A5=B1=E2=C7=D1 =B1=A4=B0=ED =B8=DE=C0= =CF=C0=D4=B4=CF=B4=D9=2E
=BC=F6=BD=C5=C0=BB =BF=F8=C4=A1 =BE=CA=C0=B8=BD= =C3=B8=E9 = =BC=F6=BD=C5=B0=C5=BA=CE=B8=A6 =B4=AD=B7=AF=C1=D6=BC=BC=BF=E4

 

[=B0=FA=C7=D0]  =B2=DE=C0=C7 =BF=A1=B3=CA=C1=F6 =B9=AB=C7=D1 =B5=BF= =B7=C2

=B9=AB=C7=D1 =B5=BF=B7=C2=C0=BA =B2=DE=C0=C7 =BF=A1=B3=CA=C1=F6=B0=A1 =BE= =C6=B4=D2 =BC=F6 =BE=F8=BD=C0=B4=CF=B4=D9=2E=2E=2E=2E
=C8=AD=BC=AE =BF=AC= =B7=E1=B8=A6 =BB=E7=BF=EB=C7=CF=C1=F6 =BE=CA=B0=ED,
=BF=AC=B7=E1=B0=A1=BE=F8=C0=CC =B5=B9=BE=C6=B0=A1=B4=C2 = =BF=A3=C1=F8=C0=CC =C0=D6=B4=D9=B8=E9 =BF=A1=B3=CA=C1=F6=BF=A1=20 =B4=EB=C7=D1 =B9=AE=C1=A6=B4=C2 =B8=F0=B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B7=CE=BA=CE=C5=CD =C7=D4=B2=B2 = =C7=CF=B0=ED=C0=DA =C4=AB=C6=E4 =BB=E7=C0=CC=C6=AE=B8=A6 =B0=B3=BC=B3=C7=CF= =BF=A9 =B5=BF=C8=A3=C0=CE=C0=C7 =B2=DE=C0=BB =B8=B8=B5=E9=BE=EE =B0=A1=B0=ED=C0=DA =C7=D5=B4=CF=B4=D9=2E=2E=2E

=C4=AB=C6=E4 =BB=E7=C0=CC=C6=AE :  cafe=2Edaum=2Enet/106030 =C0=D4= =B4=CF=B4=D9=2E

=B8=B9=C0=CC =B9=E6=B9=AE=C7=CF=BD=C3=BE=EE =C0=DA=B7=E1 =B0=CB=BB=F6=C7= =CF=BD=C3=B0=ED =B6=C7 =B1=DB=C0=BB =B8=B9=C0=CC =BF=C3=B7=C1 =C1=D6=BC=BC= =BF=E4=2E=2E=2E=2E

  ^^ ** ^^   ^^ ** ^^  

tel : 011-281-1434  =BD=C5  =BF=EB  =C3=B6


From kevin@cazabon.com Fri Feb 14 04:25:00 2003 From: kevin@cazabon.com (Kevin@Cazabon.com) Date: Thu, 13 Feb 2003 21:25:00 -0700 Subject: [Image-SIG] PIL 1.1.4 or 1.1.3 pre-built for Python 2.2 (Windows)? Message-ID: <000901c2d3e1$0a05f4a0$310aa8c0@duallie> Does anyone have pre-built binaries (with JPEG and Tkinter support) for PIL 1.1.4 or 1.1.3 / Python 2.2? Fred only has 1.1.2 posted for 2.2. I really need the dpi tag upgrades included after 1.1.3. Thanks! Kevin. From jeff@corrt.com Fri Feb 14 02:10:55 2003 From: jeff@corrt.com (Jeff Kunce) Date: Thu, 13 Feb 2003 20:10:55 -0600 Subject: [Image-SIG] PIL 1.1.4 or 1.1.3 pre-built for Python 2.2 (Windows)? In-Reply-To: <000901c2d3e1$0a05f4a0$310aa8c0@duallie> Message-ID: <5.1.0.14.0.20030213200818.009fa600@corrt.com> ActiveState is a pretty good source for new win32 binaries: http://ppm.activestate.com/PPMPackages/PyPPM/2.2+/packages/ They have 1.1.3, but I don't see 1.1.4 yet. As I recall, the setup.py for their 1.1.3 distribution needed some tweaking. Mark may have fixed it by now. If not, I can help if you get stuck. --Jeff At 09:25 PM 2/13/03 -0700, Kevin@Cazabon.com wrote: >Does anyone have pre-built binaries (with JPEG and Tkinter support) for PIL >1.1.4 or 1.1.3 / Python 2.2? Fred only has 1.1.2 posted for 2.2. I really >need the dpi tag upgrades included after 1.1.3. > >Thanks! > >Kevin. > > >_______________________________________________ >Image-SIG maillist - Image-SIG@python.org >http://mail.python.org/mailman/listinfo/image-sig From fredrik@pythonware.com Sat Feb 15 08:01:58 2003 From: fredrik@pythonware.com (Fredrik Lundh) Date: Sat, 15 Feb 2003 09:01:58 +0100 Subject: [Image-SIG] Re: PIL 1.1.4 or 1.1.3 pre-built for Python 2.2 (Windows)? References: <000901c2d3e1$0a05f4a0$310aa8c0@duallie> Message-ID: Kevin Cazabon wrote: > Does anyone have pre-built binaries (with JPEG and Tkinter support) for PIL > 1.1.4 or 1.1.3 / Python 2.2? Fred only has 1.1.2 posted for 2.2. I really > need the dpi tag upgrades included after 1.1.3. I've uploaded Windows binaries of 1.1.4a3 (current snapshot) for Python 2.1 and Python 2.2. http://effbot.org/downloads#pil http://effbot.org/zone/pil-changes-114.htm I hope to have the first beta available in a couple of days (if not, I'll post a 1.1.4a3 source kit). From kevin@cazabon.com Wed Feb 19 23:04:29 2003 From: kevin@cazabon.com (Kevin@Cazabon.com) Date: Wed, 19 Feb 2003 16:04:29 -0700 Subject: [Image-SIG] Tkinter question... sorry! Message-ID: <006201c2d86b$41abe5c0$310aa8c0@duallie> I tried this on comp.lang.python, but no response. I figured with the great crowd of helpful people here I might have some luck, thanks! Does anyone know how to enable a user to "drag and drop" files from the windows desktop onto an application (i.e. Tkinter.Tk() instance)? The application would have to capture that event, and receive the resulting filenames. Tkdnd doesn't support this, only dnd WITHIN the app. Thanks for any suggestions! Kevin. From karbak@cmu.edu Fri Feb 21 00:37:26 2003 From: karbak@cmu.edu (K.Arun) Date: Thu, 20 Feb 2003 19:37:26 -0500 Subject: [Image-SIG] 16-bit unsigned short: PIL tile descriptor? Message-ID: Hello, I'm trying to write a PIL plug-in for a in-house image format. It's a very simple format with a 1024-byte header followed by unsigned shorts in big-endian byte order. I tried using both the 'raw' and 'bit' decoders without much success - while 'L' works with 'raw', in that I don't get any errors, my images look weird when processed. Using "F;16B" in the parameters tuple for 'raw' mode (what should self.mode be in this case ?), results in a 'ValueError : unrecognized mode' exception being thrown. Could someone throw light on what self.mode needs to be set to and the correct tile descriptor values to use ? Thanks, -arun From julian@preferred.com Sun Feb 23 19:05:46 2003 From: julian@preferred.com (Jim Julian) Date: Sun, 23 Feb 2003 14:05:46 -0500 Subject: [Image-SIG] VC++ 6.0 and makefile.win Message-ID: <5.2.0.9.0.20030223135307.009fbec0@pop.preferred.com> Hi, Recently I downloaded PIL 1.1.3 to compile with Radiance file format support. When I compiled the library, I got the errors below. As a safety check, I downloaded and attempted to compile version 1.1.2 and attempted a compile without any modification. The same errors occurred. The makefile.win comments state compatibility with VC++ 4.X and 5.0. I'm using 6.0. Any suggestions? Thanks, Jim Julian ---------------------------------------------------------------------------- Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl.exe -W3 -Ox -O2 -c -MD -nologo -I../kits -I../kits -I../kits /c Dib.c Dib.c D:\MICROS~1\VC98\INCLUDE\basetsd.h(33) : <---- VC file error C2632: 'int' followed by 'int' is illegal basetsd.h(33) : error C2059: syntax error : ',' basetsd.h(41) : warning C4114: same type qualifier used more than once basetsd.h(41) : error C2632: 'int' followed by 'int' is illegal basetsd.h(41) : error C2059: syntax error : ',' NMAKE : fatal error U1077: 'cl.exe' : return code '0x2' Stop. ---------------------------------------------------------------------------- line 33: typedef int INT32, *PINT32; line 41: typedef unsigned int UINT32, *PUINT32; ---------------------------------------------------------------------------- From bh@intevation.de Mon Feb 24 10:58:00 2003 From: bh@intevation.de (Bernhard Herzog) Date: 24 Feb 2003 11:58:00 +0100 Subject: [Image-SIG] VC++ 6.0 and makefile.win In-Reply-To: <5.2.0.9.0.20030223135307.009fbec0@pop.preferred.com> References: <5.2.0.9.0.20030223135307.009fbec0@pop.preferred.com> Message-ID: <6qptpidjyf.fsf@salmakis.intevation.de> Jim Julian writes: [...] > cl.exe -W3 -Ox -O2 -c -MD -nologo -I../kits -I../kits > -I../kits /c Dib.c > Dib.c > D:\MICROS~1\VC98\INCLUDE\basetsd.h(33) : <---- VC file > error C2632: 'int' followed by 'int' is illegal IIRC, this is due to a preprocessor macro defined in ImPlatform.h that expands to int and causes problems in that Windows headerfile. I think what I did at some point to solve this is to simply #include basetsd.h before including Imaging.h in Dib.c. HTH, Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://www.mapit.de/ From klimek@grc.nasa.gov Mon Feb 24 15:53:15 2003 From: klimek@grc.nasa.gov (Robert Klimek) Date: Mon, 24 Feb 2003 15:53:15 +0000 Subject: [Image-SIG] 16-bit unsigned short: PIL tile descriptor? In-Reply-To: References: Message-ID: <200302241553.15359.klimek@grc.nasa.gov> --------------Boundary-00=_RGLT2QNRVQT8EJAQI8OY Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Friday February 21 2003 12:37 am, K.Arun wrote: > Hello, > > I'm trying to write a PIL plug-in for a in-house image > format. It's a very simple format with a 1024-byte header followed by > unsigned shorts in big-endian byte order. I tried using both the 'raw' > and 'bit' decoders without much success - while 'L' works with 'raw', > in that I don't get any errors, my images look weird when > processed. Using "F;16B" in the parameters tuple for 'raw' mode (what > should self.mode be in this case ?), results in a 'ValueError : > unrecognized mode' exception being thrown. Could someone throw light > on what self.mode needs to be set to and the correct tile descriptor > values to use ? Thanks, Sorry I'm a bit late with this reply but just got back from vacation. A f= ew=20 months ago I've played around with reading 16-bit and 12-bit TIFF files u= sing=20 PIL and I've attached a small crude test program. Note that you need wxPy= thon=20 to run this program but maybe you can get some ideas there. Also, it may = not=20 work with any 16-bit tif files but is customized for only one particular=20 type. Bob --------------Boundary-00=_RGLT2QNRVQT8EJAQI8OY Content-Type: text/x-python; charset="iso-8859-1"; name="Read12-bitTiffData.py" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Read12-bitTiffData.py" # Program wxReadData import os from wxPython.wx import * import Image ID_FILE_OPEN = 101 ID_FILE_EXIT = 103 class mtImagePanel(wxPanel): def __init__(self, parent, id): wxPanel.__init__(self, parent, id) self.image = None EVT_PAINT(self, self.OnPaint) def display(self, pilimage): self.image = self.PILToWX(pilimage) self.Refresh(true) def OnPaint(self, evt): dc = wxPaintDC(self) if self.image: dc.DrawBitmap(self.image.ConvertToBitmap(), 0,0) def PILToWX(self, image): "convert a PIL image to a wxImage" if image.mode != 'RGB': # SetData() requires an RGB image image = image.convert('RGB') imageData = image.tostring('raw', 'RGB') imageWx = wxEmptyImage(image.size[0], image.size[1]) imageWx.SetData(imageData) return imageWx class mtFrame(wxFrame): def __init__(self, parent, ID, title): wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(500, 400)) self.iPanel = mtImagePanel(self, -1) self.im = None # Construct "File" menu self.menuBar = wxMenuBar() self.menuFile = wxMenu() self.menuFile.Append(ID_FILE_OPEN, "&Open image","") EVT_MENU(self, ID_FILE_OPEN, self.OnOpen) self.menuFile.AppendSeparator() self.menuFile.Append(ID_FILE_EXIT, "E&xit", "") EVT_MENU(self, ID_FILE_EXIT, self.OnExit) self.menuBar.Append(self.menuFile, "&File"); # Construct "Process" menu self.menuProcess = wxMenu() self.menuProcess.Append(1200, "Read 12-bit image", "") EVT_MENU(self, 1200, self.OnRead1) self.menuProcess.Append(1201, "Read 16-bit image", "") EVT_MENU(self, 1201, self.OnRead2) self.menuProcess.Append(1203, "View tiff tags", "") EVT_MENU(self, 1203, self.OnRead3) self.menuBar.Append(self.menuProcess, "&Process") self.SetMenuBar(self.menuBar) def OnOpen(self, event): fileTypes = self.getImageFileFilter('wxOPEN') fd = wxFileDialog(self, "Open Image", "", "", fileTypes, wxOPEN) if fd.ShowModal() == wxID_OK: self.LoadImage(fd.GetPath()) fd.Destroy() def getImageFileFilter(self, type): f2 = '|TIFF file (*.tif)|*.tif;*.TIF' f3 = '|BMP file (*.bmp)|*.bmp;*.BMP' f4 = '|JPG file (*.jpg)|*.jpg;*.JPG' f5 = '|PNG file (*.png)|*.png;*.PNG' f6 = '|GIF file (*.gif)|*.gif;*.GIF' if type == 'wxOPEN': # OPEN can read tga, but not save label = 'All supported image files|' ext = '*.tif;*.TIF;*.jpg;*.JPG;*.bmp;*.BMP;*.png;*.PNG;*.gif;*.GIF;*.tga;*.TGA' f1 = label + ext f7 = '|TGA file (*.tga)|*.tga;*.TGA' fileTypes = f1 + f2 + f3 + f4 + f5 + f6 + f7 else: label = 'All supported image files|' ext = '*.tif;*.TIF;*.jpg;*.JPG;*.bmp;*.BMP;*.png;*.PNG;*.gif;*.GIF' f1 = label + ext fileTypes = f1 + f2 + f3 + f4 + f5 + f6 return fileTypes def LoadImage(self, path): try: self.im = Image.open(path) self.iPanel.display(self.im) except IOError: print "can't open the file" def OnRead1(self, event): '''Read a 12 bit image - no padding ''' imgDir = '/home/klimek/Images/16-bit' inFile = os.path.abspath(os.path.join(imgDir, '12-bit-IMAP.tif')) f = open(inFile, 'rb') allData = f.read() f.close() offset = 8 # this was determined from "StripOffsets" tag by reading an 8-bit IMAP image data = allData[offset : 1024*1024*12/8+offset] # 12-bit saved by IMAP bits = 12 # number of bits per pixel pad = 0 # 0=no padding, 8=lines are padded to full bytes fill = 0 sign = 0 # 0=bit fields are unsigned, non-zero= bit fields are sign extended orientation = 1 # 1=1st line is on top of image, -1=1st line on bottom im = Image.fromstring("F", (1024,1024), data, "bit", bits, pad, fill, sign, orientation) pix1 = im.getpixel((50,50)) pix2 = im.getpixel((500,300)) print pix1, pix2 def OnRead2(self, event): '''Read a 16 bit image - originally 12-bit padded to 16 bit ''' 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 an 8-bit IMAP image data = allData[offset : 1024*1024*16/8+offset] # 16-bit saved by IMAP im = Image.fromstring("F", (1024,1024), data, "raw", "F;16", 0,1) pix1 = im.getpixel((50,50)) pix2 = im.getpixel((500,300)) print pix1, pix2 def getTag(self, im, n): t = -1 if im.tag.tags.has_key(n): t = im.tag.tags[n] return t def OnRead3(self, event): '''Read tiff tags from on already opened (loaded) image. Must be read before any other operations are done on the image, otherwise the tag info is lost.''' imgDir = '/home/klimek/Images/16-bit' inFile = os.path.abspath(os.path.join(imgDir, '8-bit-IMAP.tif')) # saved by IMAP im = Image.open(inFile) ## inFile = os.path.abspath(os.path.join(imgDir, '8-bit-PIL.tif')) # saved by PIL ## im = Image.open(inFile) w = self.getTag(im, 256) #ImageWidth h = self.getTag(im, 257) #ImageLength so = self.getTag(im, 273) #StripOffsets print w, h, so def OnCloseWindow(self, event): self.Destroy() def OnExit(self, event): self.Close(true) #--------------------------------------------------------------------------- class mtApp(wxApp): def OnInit(self): frame = mtFrame(NULL, -1, "ReadTiffData") # can set frame title here frame.Show(true) self.SetTopWindow(frame) return true app = mtApp(0) app.MainLoop() --------------Boundary-00=_RGLT2QNRVQT8EJAQI8OY--