From jiang@henry.indstate.edu Thu May 1 05:08:10 1997 From: jiang@henry.indstate.edu (Huey Jiang) Date: Wed, 30 Apr 1997 23:08:10 -0500 Subject: [PYTHON IMAGE-SIG] PIL installation Message-ID: <9705010408.AA20144@henry.indstate.edu> Hi There, I just installed PIL, smoothly, but I cannot run the demos in /Scripts. I tried viewer.py, with error as: TclError: unknown color name "systembuttonface" It maybe due to that I did not install JPEG, I do not know. Do I have to install JPEG to run the demos? Huey Jiang Indiana State Univ. _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From ivantk@hotmail.com Thu May 1 22:13:39 1997 From: ivantk@hotmail.com (Ivan Tkatchev) Date: Thu, 01 May 1997 14:13:39 PDT Subject: [PYTHON IMAGE-SIG] PIL installation Message-ID: <199705012113.OAA19318@f47.hotmail.com> >Hi There, > >I just installed PIL, smoothly, but I cannot run the demos in /Scripts. >I tried viewer.py, with error as: > > TclError: unknown color name "systembuttonface" > >It maybe due to that I did not install JPEG, I do not know. Do I have to >install JPEG to run the demos? > This is not a problem with PIL. This is a tkinter bug. To fix it, simply replace 'systembuttonface' with 'gray85' and it should work fine. (I had the same problem.) --------------------------------------------------------- Get Your *Web-Based* Free Email at http://www.hotmail.com --------------------------------------------------------- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Sun May 4 14:23:54 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Sun, 4 May 1997 15:23:54 +0200 Subject: [PYTHON IMAGE-SIG] PIL installation In-Reply-To: <199705012113.OAA19318@f47.hotmail.com> (ivantk@hotmail.com) Message-ID: <9705041323.AA24336@arnold.image.ivab.se> > > TclError: unknown color name "systembuttonface" > > This is not a problem with PIL. This is a tkinter bug. > To fix it, simply replace 'systembuttonface' with 'gray85' > and it should work fine. (I had the same problem.) It's actually a bug in the viewer.py script (systembuttonface isn't defined in Unix versions of Tk(inter)): Here's an improved version, which uses a temporary label widget to get the correct background colour: # # handle transparent images w = Label() r, g, b = root.winfo_rgb(w["background"]) rgb = r / 256, g / 256, b / 256 w.destroy() (from 0.2b5, which I hopefully will get time to release real soon now...) Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From hinsen@ibs.ibs.fr Mon May 5 13:07:42 1997 From: hinsen@ibs.ibs.fr (Konrad Hinsen) Date: Mon, 5 May 1997 14:07:42 +0200 Subject: [PYTHON IMAGE-SIG] Re: [PYTHON MATRIX-SIG] NumPy and PIL extension module In-Reply-To: Message-ID: <199705051207.OAA20769@lmspc2.ibs.fr> > I'm running into problems in figuring out what type I should use for the > array and how to set the (x,y,colorplanes...) in the array. Here is what > I have so far: *Why* do you want to store images in arrays? Which array operations do you expect to use? Depending on the answer, you might need different arrangements of data in the array. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@ibs.ibs.fr Laboratoire de Dynamique Moleculaire | Tel.: +33-4.76.88.99.28 Institut de Biologie Structurale | Fax: +33-4.76.88.54.94 41, av. des Martyrs | Deutsch/Esperanto/English/ 38027 Grenoble Cedex 1, France | Nederlands/Francais ------------------------------------------------------------------------------- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Zachary_Roadhouse@brown.edu Sun May 4 04:57:05 1997 From: Zachary_Roadhouse@brown.edu (Zachary_Roadhouse@brown.edu) Date: Sat, 03 May 1997 23:57:05 -0400 (EDT) Subject: [PYTHON IMAGE-SIG] NumPy and PIL extension module Message-ID: Hello! With exams nearly over, I am attempting to delve into writing Python extension modules. I would like to write a module nPIL which has two functions in it for converting between PyArrayObject and Imaging objects. array ImageToArray(image) image ArrayToImage(array) I have a module written in python that does what I'm asking but at the expense of converting to a string first. It also doesn't handle multi-banded images (just grey scale). I'm running into problems in figuring out what type I should use for the array and how to set the (x,y,colorplanes...) in the array. Here is what I have so far: static PyObject* ImageToArray(PyObject* args) { PyObject* op; Imaging im; /* The image can have up to three dimensions */ /* x,y and number of color planes */ int dims[3]; PyObject* array; UINT8 *p; /* Check to see that one arguement was passed in */ if (!PyArg_ParseTuple(args, "O", &op)) return NULL; /* Check to see if that object is an Imaging */ im = PyImaging_AsImaging(op); if (!im) return NULL; /* Set the dimensions of the array to be the */ /* x and y dimensions of the image */ dims[0] = im->xsize; dims[1] = im->ysize; /* single layer */ if(im->image8) { int value; array = PyArray_FromDims(2,dims,PyArray_INT); value = im->image8[y][x]; } /* multilayer */ else { if(im->bands == 3) { dims[2] = 3; array = PyArray_FromDims(3,dims,PyArray_INT); p = (UINT8*) &im->image32[y][x]; } } - Zack E-MAIL: Zachary_Roadhouse@brown.edu WEB: http://althor.netspace.org/~zack/ Brown University, Box 220, Providence, RI 02912 Phone: (401) 863 - 5435 _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From arb@connect.com.au Fri May 9 07:00:42 1997 From: arb@connect.com.au (Anthony Baxter) Date: Fri, 09 May 1997 16:00:42 +1000 Subject: [PYTHON IMAGE-SIG] docs for ImagePath? (and a bug) Message-ID: <199705090600.QAA07130@shara.off.connect.com.au> I've been reading the source for path.c to try to figure out the ImagePath module. As far as I can tell, ImagePath does the following. Can someone (Hi Fredrik!) confirm or deny these bits? ImagePath.Path(sequence) Returns a Path object. This behaves like a sequence of x,y tuples, and can be passed to ImageDraw.Draw methods and the like. Actually, no, it doesn't. It supports the len and getitem methods, but everything else is a null pointer, and causes Python to seg fault if called. BUG This is a bug - if you're going to pretend to be a sequence, you should support all methods of the sequence. (even if you just raise a TypeError) It can be passed a sequence of (x,y) tuples, a sequence of numbers (which are interpreted as (x0,y0,x1,y1,x2,y2,....), or another Path object. Path objects have the following methods: compact([dist]) Simple-minded method to shorten path. A point is removed if the city block distance to the previous point is less than the given distance. "city block distance"? dist defaults to '2.0' getbbox() return the bounding box of all points in the path. map(fn) apply function fn to each (x,y) element of the path. fn will be called as fn(x,y). Don't try the real funky map() tricks - it's not really the same as map(). :) (why doesn't it have filter and reduce?) tolist() return the path as a list of xy tuples. transform((a,b,c,d,e,f)[,wrap]) perform an affine transform on each point in the path. (x,y) = (a*x+b*y+c, d*x+e*y+f) if wrap is passed as an arg, wrap y coordinate points at 'wrap'. _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik_lundh@ivab.se Sat May 10 15:24:44 1997 From: fredrik_lundh@ivab.se (Fredrik Lundh) Date: Sat, 10 May 1997 16:24:44 +0200 Subject: [PYTHON IMAGE-SIG] docs for ImagePath? (and a bug) In-Reply-To: <199705090600.QAA07130@shara.off.connect.com.au> (message from Anthony Baxter on Fri, 09 May 1997 16:00:42 +1000) Message-ID: <9705101424.AA22225@arnold.image.ivab.se> > I've been reading the source for path.c to try to figure out the ImagePath > module. As far as I can tell, ImagePath does the following. Can someone > (Hi Fredrik!) confirm or deny these bits? Cannot wait for official releases, can you ;-) As far as I could tell, you got it all right. And what you describe won't change much in 0.2b5, so feel free to start using it. FWIW, here's some other things that will be present in 0.2b5 (to be released any day soon): - faster paste operations (including some magic to greatly speed up crop/paste sequences) - faster Tk interface, including support for transparent photo images (now that's pretty cool!) - histogram over region of interest - more formats, including Image Composer, FlashPix, PIXAR, McIdas and the usual bunch of bug fixes and performance improvements Now, if I only could get around to fix the palette stuff, the next release will be 0.2 final. Cheers /F (http://hem1.passagen.se/eff) PS. "city block distance?" Yep, that's what you get when you have to drive around the block, instead of walking across the park. The distance between (0,0) and (1,1) is thus 2. _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Anthony Baxter Mon May 12 01:59:21 1997 From: Anthony Baxter (Anthony Baxter) Date: Mon, 12 May 1997 10:59:21 +1000 Subject: [PYTHON IMAGE-SIG] docs for ImagePath? (and a bug) In-Reply-To: Your message of "Sat, 10 May 1997 16:24:44 +0200." <9705101424.AA22225@arnold.image.ivab.se> Message-ID: <199705120059.KAA14349@jambu.off.connect.com.au> >>> Fredrik Lundh wrote > Cannot wait for official releases, can you ;-) Hey, I _tried_ to convince people here that I should be able to leave the project for a few weeks until PIL 0.2 came out, but they were most unwilling. > As far as I could tell, you got it all right. And what you describe > won't change much in 0.2b5, so feel free to start using it. Good - because I already have been using it. I figured that most of the ImagePath code will stay the same, because you use it all over the place, and you'd have to change lots of code :) > - faster paste operations (including some magic to greatly speed up > crop/paste sequences) Yay. > Now, if I only could get around to fix the palette stuff, the next > release will be 0.2 final. What sort of things do you want in the Palette module? Can other people help out here? > PS. "city block distance?" Yep, that's what you get when you have to > drive around the block, instead of walking across the park. The > distance between (0,0) and (1,1) is thus 2. Ah, ok. You've obviously never driven in Brisbane, where every single central street is one way. The distance between (0,0) and (1,1) can be anything from 2 to 20. :) Anthony _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik.lundh@image.combitech.se Tue May 13 16:26:44 1997 From: fredrik.lundh@image.combitech.se (Fredrik Lundh) Date: Tue, 13 May 1997 17:26:44 +0200 Subject: [PYTHON IMAGE-SIG] Re: [PIL] How to write compressed TIFF images In-Reply-To: <5d7cd$62e26.61@WWW1> (hjwidmai@foxboro.com) Message-ID: <9705131526.AA04453@arnold.image.ivab.se> > an hour ago I wanted to show (to my boss) how easy > it is to do some image manipulation in Python. He > was quite impressed until I tried to write the > resulting TIFF image to a file with G4 compression. > Is it really so? Can't the tiff library be used for > this? Sure, it only takes someone to do it. And an integrated G4 codec is in the plans for 0.4 or something, but while you're waiting, here's some simple code that uses the "tiffcp" utility to write TIFF's of all flavours. Just import the following module from your program, and you can then use the "compression" option with the save method as shown in the test snippet. Cheers /F # # use "tiffcp" to write compressed TIFF files. # # fredrik lundh (may 13, 1997) # import os, tempfile # install standard driver import Image, TiffImagePlugin LZW = "lzw" ZIP = "zip" JPEG = "jpeg" PACKBITS = "packbits" G3 = "g3" G4 = "g4" def _save(im, fp, filename): # check compression mode try: compression = im.encoderinfo["compression"] except KeyError: # use standard driver TiffImagePlugin._save(im, fp, filename) else: # compress via temporary file if compression not in (LZW, ZIP, JPEG, PACKBITS, G3, G4): raise IOError, "unknown compression mode" file = tempfile.mktemp() im.save(file, "TIFF") os.system("tiffcp -c %s %s %s" % (compression, file, filename)) try: os.unlink(file) except: pass Image.register_save(TiffImagePlugin.TiffImageFile.format, _save) if __name__ == "__main__": # test im = Image.open("/usr/iv/tip/images/lenna.ppm") im = im.point(lambda v: v >= 128 and 255, "1") im.save("lenna.tif", compression=G4) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From jiang@geosun.indstate.edu Fri May 16 01:15:15 1997 From: jiang@geosun.indstate.edu (Yu Jiang) Date: Thu, 15 May 1997 19:15:15 -0500 Subject: No subject Message-ID: <199705160015.TAA24638@geosun.indstate.edu> Hi Everybody: I am learning PIL, and I do not understand this method in Image.py: def composite(image1, image2, mask): "Create composite image by blending images using a transparency mask" image = image2.copy() image.paste(image1, None, mask) return image What is the result? How to set mask value? I need to merge two side by side images into one, does this method do the trick? Huey _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik.lundh@image.combitech.se Fri May 16 09:12:39 1997 From: fredrik.lundh@image.combitech.se (Fredrik Lundh) Date: Fri, 16 May 1997 10:12:39 +0200 Subject: No subject In-Reply-To: <199705160015.TAA24638@geosun.indstate.edu> (jiang@geosun.indstate.edu) Message-ID: <9705160812.AA18316@arnold.image.ivab.se> > I am learning PIL, and I do not understand this method in Image.py: > > def composite(image1, image2, mask): > "Create composite image by blending images using a transparency mask" > I need to merge two side by side images into one, does this method > do the trick? Any special reason you cannot use the handbook? The composite function is described in there, and there's a section on "cutting, pasting and merging images" that may be exactly what you need. Cheers /F _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik.lundh@image.combitech.se Fri May 16 09:12:39 1997 From: fredrik.lundh@image.combitech.se (Fredrik Lundh) Date: Fri, 16 May 1997 10:12:39 +0200 Subject: No subject In-Reply-To: <199705160015.TAA24638@geosun.indstate.edu> (jiang@geosun.indstate.edu) Message-ID: <9705160812.AA18316@arnold.image.ivab.se> > I am learning PIL, and I do not understand this method in Image.py: > > def composite(image1, image2, mask): > "Create composite image by blending images using a transparency mask" > I need to merge two side by side images into one, does this method > do the trick? Any special reason you cannot use the handbook? The composite function is described in there, and there's a section on "cutting, pasting and merging images" that may be exactly what you need. Cheers /F _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fdrake@CNRI.Reston.Va.US Mon May 19 20:26:38 1997 From: fdrake@CNRI.Reston.Va.US (Fred L. Drake, Jr.) Date: Mon, 19 May 1997 15:26:38 -0400 (EDT) Subject: [PYTHON IMAGE-SIG] Using BDF font files with PIL Message-ID: The PIL "features" sheet says that BDF files can be used; how is this done? I don't see it in the manual. If I just missed it there, please point me in the right direction & I'll read it myself. Thanks! -Fred -- Fred L. Drake, Jr. fdrake@cnri.reston.va.us Corporation for National Research Initiatives 1895 Preston White Drive Reston, VA 20191-5434 _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik.lundh@image.combitech.se Tue May 20 09:24:49 1997 From: fredrik.lundh@image.combitech.se (Fredrik Lundh) Date: Tue, 20 May 1997 10:24:49 +0200 Subject: [PYTHON IMAGE-SIG] Using BDF font files with PIL In-Reply-To: (fdrake@CNRI.Reston.Va.US) Message-ID: <9705200824.AA06881@arnold.image.ivab.se> > The PIL "features" sheet says that BDF files can be used; how is > this done? I don't see it in the manual. If I just missed it > there, please point me in the right direction & I'll read it myself. Let's see... 1. there's a bdf2pil utility in the Scripts directory, which reads a BDF file and produces a PIL-compatible font file. 2. the ImageFont module can be used to read such files (use either load or load_path) 3. the setfont() method in the ImageDraw class can be used to set the font, and the text() method is then used to draw with it. And yes, the bdf2pil script included in 0.2b4 chokes on some BDF files (probably platform dependent). The attached patch for pre-0.2b5 versions was contributed by Joel Shprentz. Cheers /F -------------------------------------------------------------------- *** bdf2pil.py.orig Thu Nov 7 13:57:44 1996 --- bdf2pil.py Thu Nov 7 16:57:38 1996 *************** *** 69,87 **** i = string.find(s, " ") props[s[:i]] = s[i+1:-1] # load bitmap bitmap = [] while 1: s = f.readline() if not s or s[:7] == "ENDCHAR": break ! bitmap.append(s[:-1]) bitmap = string.join(bitmap, "") - - [w, h, x, y] = map(string.atoi, string.split(props["BBX"])) - [dx, dy] = map(string.atoi, string.split(props["DWIDTH"])) - - bbox = (dx, dy, x, y, x+w, y+h) return id, string.atoi(props["ENCODING"]), bbox, bitmap --- 69,88 ---- i = string.find(s, " ") props[s[:i]] = s[i+1:-1] + [w, h, x, y] = map(string.atoi, string.split(props["BBX"])) + [dx, dy] = map(string.atoi, string.split(props["DWIDTH"])) + + bbox = (dx, dy, x, y, x+w, y+h) + # load bitmap + maxHexChars = 2 * ((w + 7) / 8) bitmap = [] while 1: s = f.readline() if not s or s[:7] == "ENDCHAR": break ! bitmap.append(s[:maxHexChars]) bitmap = string.join(bitmap, "") return id, string.atoi(props["ENCODING"]), bbox, bitmap _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Fred L. Drake, Jr." This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-824023566-864146766=:3781 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Some time ago, I asked about using Tk & PIL together with a "stock" _tkinter.so. Fredrik kindly invited me to have a go at it. ;-) Well, I did, and it didn't take much time once I sat down to do it. I've attached the two files needed to build the PIL/Tk support: a modified copy of Tk/tkImaging.c (I added a module initialization function), and a Tk/Setup.in file. In addition, the line: import _tkimaging should be added to Lib/ImageTk.py; I added it immediately after the existing import statement at the top of the file. To build this support, copy the file Misc/Makefile.pre.in from the Python distribution into the Tk/ directory of the PIL distrinbution and check the paths in Tk/Setup.in. Run the command: make -f Makefile.pre.in boot ; make This will build a new module which does nothing more than register the PIL integration code with the Tk PhotoImage support. Copy _tkimagingmodule.so and _imagingmodule.so to $exec_prefix/lib/python1.4/sharedmodules, and Lib/*.py from PIL to $prefix/lib/python1.4. (Use the $prefix and $exec_prefix from the Python build.) Then you're all set! Here's what it's really doing: The functions in Tk/tkImaging.c need to have access to a couple of functions from the Tk library to do their work. These are exported by whatever object is providing the library for _tkinter.so. Typically, the Tk library is statically linked into _tkinter.so, but the symbols are exported. The new module links to _tkinter.so, which provides the needed entry points into the Tk library. If Tk is dynamically linked to _tkinter.so, _tkimagingmodule.so should be linked to the dynamic Tk library rather than _tkinter.so; do this by adjusting the Setup.in (or better yet, the generated Setup file) to reflect this (see the TK variable). If Tk is statically linked to _tkinter.so but the Tk symbols are not exported, you have to use the old method. ;-( Enjoy! -Fred -- Fred L. Drake, Jr. fdrake@cnri.reston.va.us Corporation for National Research Initiatives 1895 Preston White Drive Reston, VA 20191-5434 ---559023410-824023566-864146766=:3781 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="tkImaging.c" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: LyogJElkOiB0a0ltYWdpbmcuYyx2IDEuMSAxOTk2LzA1LzA5IDIyOjExOjM5 IGZyZWRyaWsgRXhwICQNCiAqDQogKiBUaGUgUHl0aG9uIEltYWdpbmcgTGli cmFyeS4NCiAqDQogKiBGaWxlOg0KICoJdGtJbWFnaW5nLmMgLS0gYSBUSzQg aW50ZXJmYWNlIGZvciBQeXRob24gSW1hZ2luZyBvYmplY3RzDQogKg0KICog RGVzY3JpcHRpb246DQogKglDb3B5IChwYXJ0cyBvZikgYSBuYW1lZCBkaXNw bGF5IG1lbW9yeSB0byB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FnaW5nKTsNCg0KICAg IFRrSW1hZ2luZ19Jbml0KCk7DQogICAgbW9kdWxlID0gUHlfSW5pdE1vZHVs ZSgiX3RraW1hZ2luZyIsIGZ1bmN0aW9ucyk7DQoNCn0gICAvKiBpbml0X3Rr aW1hZ2luZygpICovDQo= ---559023410-824023566-864146766=:3781 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="Setup.in" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: IyBTZXR1cC5pbiBmb3IgYnVpbGRpbmcgdGhlIFBJTC9UayBpbnRlZ3JhdGlv biBtb2R1bGUgc3VjaCB0aGF0IGEgc3RvY2sNCiMgX3RraW50ZXIgY2FuIGJl IHVzZWQuICBUaGlzIGlzIGJldHRlciB0aGFuIGhhdmluZyB0byBkbyBhIG5l dyBfdGtpbnRlci5zbw0KIyBmb3IgZWFjaCBwbGF0Zm9ybSwgYW5kIHNob3Vs ZCBtYWtlIGJpbmFyeSBkaXN0cmlidXRpb25zIG9mIFBJTCBlYXNpZXIgdG8N CiMgdXNlLg0KDQoqc2hhcmVkKg0KDQojIFBvaW50IHRoaXMgdG8gdGhlIGxv Y2F0aW9ucyBvZiB0aGUgVGNsL1RrIGluY2x1ZGUgZmlsZXMuDQojDQpUQ0xU S0lOQ0xVREVTPS9ob21lL2ZkcmFrZS9pbmNsdWRlDQoNCiMgUG9pbnQgdGhp cyB0byB0aGUgWDExIGluY2x1ZGUgZmlsZXMuDQojDQpYSU5DTFVERVM9L3Vz ci9vcGVud2luL2luY2x1ZGUNCg0KIyBTZXQgJChUSykgdG8gdGhlIG9iamVj dCBjb250YWluaW5nIHRoZSBUayBsaWJyYXJ5OyB0aGlzIHNob3VsZCB0eXBp Y2FsbHkNCiMgYmUgdGhlIF90a2ludGVyLnNvIG9iamVjdCBjcmVhdGVkIGJ5 IHRoZSBzdG9jayBQeXRob24gYnVpbGQuDQojDQpUSz0kKGV4ZWNfcHJlZml4 KS9saWIvcHl0aG9uJChWRVJTSU9OKS9zaGFyZWRtb2R1bGVzL190a2ludGVy LnNvDQoNCiMgWW91IHNob3VsZG4ndCBuZWVkIHRvIGNoYW5nZSB0aGlzLg0K Iw0KSU5DTFVERVM9LUkuLi9saWJJbWFnaW5nIC1JJChUQ0xUS0lOQ0xVREVT KSAtSSQoWElOQ0xVREVTKQ0KX3RraW1hZ2luZyB0a0ltYWdpbmcuYyAkKElO Q0xVREVTKSAkKFRLKQ0K ---559023410-824023566-864146766=:3781-- _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Zachary_Roadhouse@brown.edu Tue May 20 21:53:28 1997 From: Zachary_Roadhouse@brown.edu (Zachary_Roadhouse@brown.edu) Date: Tue, 20 May 1997 16:53:28 -0400 (EDT) Subject: [PYTHON IMAGE-SIG] ImageMagick Module Message-ID: Hello all! This release will hopefully wet your appetite. I've added most of the functionality of PerlMagick -- only a few methods remain undefined. I've also added routines to convert to the PIL image format (so you can display them using Tk) and to Numeric arrays. A web page has been created, and the author of ImageMagick is very excited about this. PythonMagick is my first C-extension, so I need feedback! Here is the readme: PythonMagick v0.1a4 This is a C-Extension module for Python which gives it the image processing power of the ImageMagick imaging library. Routines are included to convert from the MagickImage type to PIL Images and Numeric arrays. Have fun! Documentation can be found at: http://www.techhouse.brown.edu/~zack/pymagick/ Look for more releases in: ftp://ftp.lems.brown.edu/pub/turtles/magick/ You'll need to get the ImageMagick distribution. It can be found at: http://www.wizards.dupont.com/cristy/ The following have yet to be implimented: Display (well -- have a hack), Annotate, Charcoal, Clone, Draw, Map, Trim, Wave All the Set methods Mogrify Multiple image handling Questions, comments, contributions to zack@lems.brown.edu --Zack /--------------------------------------------------------------------- Zachary F. Roadhouse Home: (401)863-xxxx Box 220, Brown University, Providence, RI 02912 Work: (401)863-2177 E-MAIL: Zachary_Roadhouse@brown.edu WWW: http://www.techhouse.brown.edu/~zack _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Zachary_Roadhouse@brown.edu Wed May 21 22:19:43 1997 From: Zachary_Roadhouse@brown.edu (Zachary_Roadhouse@brown.edu) Date: Wed, 21 May 1997 17:19:43 -0400 (EDT) Subject: [PYTHON IMAGE-SIG] Should this work? Message-ID: While trying to play with conversion between PIL and Magick images, I ran into the following problem: def ImageToPIL(img): """Converts to a PIL Image""" import Image out = Image.new(img.mode,img.size) out.fromstring(img.tostring()) return out Since Magick and PIL images have similar interfaces this should work for both. When I try to do this with a PIL image of mode 'P', it breaks. Is there a way to force a PIL image into 'RGB' mode before conversion? I would like to do this in order to convert from a PIL image to a Magick image by: img = Magick.image() img.fromstring(pil.size[0],pil.size[1],pil.tostring()) I'm guessing that the palette stuff doesn't work. When will it? --Zack /--------------------------------------------------------------------- Zachary F. Roadhouse Home: (401)863-xxxx Box 220, Brown University, Providence, RI 02912 Work: (401)863-2177 E-MAIL: Zachary_Roadhouse@brown.edu WWW: http://www.techhouse.brown.edu/~zack _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik.lundh@image.combitech.se Fri May 23 09:51:29 1997 From: fredrik.lundh@image.combitech.se (Fredrik Lundh) Date: Fri, 23 May 1997 10:51:29 +0200 Subject: [PYTHON IMAGE-SIG] Should this work? In-Reply-To: Message-ID: <9705230851.AA14392@arnold.image.ivab.se> > out = Image.new(img.mode,img.size) > out.fromstring(img.tostring()) > > Since Magick and PIL images have similar interfaces this should > work for both. When I try to do this with a PIL image of mode 'P', > it breaks. Is there a way to force a PIL image into 'RGB' mode > before conversion? The fromstring/tostring methods simply ignore the palette, and in 0.2b4, there's no clean way to attach a palette to an image. So the quickest solution is probably to convert the image: if im.mode == "P": im = im.convert() out.fromstring(im.tostring()) (convert without an argument converts to the palette mode, or copies the image if it isn't a palette image in the first place). I'm working on better palette support for 0.2b5 (still not sure if/how palettes should be handled by tostring/fromstring, though). You may also wish to take a look at the palette patches Anthony Baxter sent to this list a while ago. Cheers /F (http://hem1.passagen.se/eff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From Anthony Baxter Fri May 23 12:29:58 1997 From: Anthony Baxter (Anthony Baxter) Date: Fri, 23 May 1997 21:29:58 +1000 Subject: [PYTHON IMAGE-SIG] Should this work? In-Reply-To: Your message of "Fri, 23 May 1997 10:51:29 +0200." <9705230851.AA14392@arnold.image.ivab.se> Message-ID: <199705231130.VAA16661@jambu.off.connect.com.au> >>> Fredrik Lundh wrote > I'm working on better palette support for 0.2b5 (still not sure if/how > palettes should be handled by tostring/fromstring, though). You may > also wish to take a look at the palette patches Anthony Baxter sent to > this list a while ago. I'm not sure about the palette patches I sent in - I'm not happy with how it all works. Eg, I'd _like_ to be able to do things like draw.setink('red'), and have it either re-use an existing palette entry, or allocate a new one... no time, no time, no time... _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From spillar@uwyo.edu Mon May 26 23:42:57 1997 From: spillar@uwyo.edu (Earl Spillar) Date: Mon, 26 May 1997 16:42:57 -0600 Subject: [PYTHON IMAGE-SIG] Installation hint needed Message-ID: <338A11F1.2031@uwyo.edu> PIL Mavens of the world: Probably this will convince everyone I really AM an idiot- but- I just installed PIL on a WinNT 4.0 machine; I tried to follow the installation instructions but I get the following error: Python 1.4 (Feb 7 1997) [MSC 32 bit (Intel)] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import Image >>> im = Image.open("/temp/lena.ppm") Traceback (innermost last): File "", line 1, in ? File "C:\Python\Imaging-0.2b4\Lib\Image.py", line 467, in open init() File "C:\Python\Imaging-0.2b4\Lib\Image.py", line 84, in init for f in os.listdir(p): nt.error: (3, 'No such process') >>> I'm guessing this is an installation problem, but I thought I got everything in the right place- Tkinter seems to be OK. Any clues would be greatly appreciated! Earl Spillar _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From spillar@uwyo.edu Tue May 27 00:05:19 1997 From: spillar@uwyo.edu (Earl Spillar) Date: Mon, 26 May 1997 17:05:19 -0600 Subject: [PYTHON IMAGE-SIG] Re: [PYTHONWIN-SIG] Python 1.4 for Win32 References: <9705261619.AA02827@arnold.image.ivab.se> Message-ID: <338A172F.89@uwyo.edu> Talk about service! I have problems with installation, hit the send button, and up comes Fredrik's annoucement of his Works For Me distribution, which promptly solves all of my problems. Thanks Fredrik! Earl Spillar _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From fredrik.lundh@image.combitech.se Mon May 26 18:39:46 1997 From: fredrik.lundh@image.combitech.se (Fredrik Lundh) Date: Mon, 26 May 1997 19:39:46 +0200 Subject: [PYTHON IMAGE-SIG] Installation hint needed In-Reply-To: <338A11F1.2031@uwyo.edu> (message from Earl Spillar on Mon, 26 May 1997 16:42:57 -0600) Message-ID: <9705261739.AA30279@arnold.image.ivab.se> > Probably this will convince everyone I really AM an idiot- but- > I just installed PIL on a WinNT 4.0 machine; I tried to > follow the installation instructions but I get the following > error: > for f in os.listdir(p): > nt.error: (3, 'No such process') If anyone here is an idiot, it's probably me. The *binary* release of PIL 0.2b4 messes up if you have bogus directories in the python path. Strangely enough, I managed to fix this in the *source* release that was made somewhat later... Anyway, as Earl noticed, it's fixed in the "0.2b5x" release included in the Python 1.4 for Win32 "WFM" kit. Cheers /F http://hem1.passagen.se/eff (python stuff) http://starship.skyport.net/crew/fredrik (more python stuff) _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From MHammond@skippinet.com.au Tue May 27 00:52:27 1997 From: MHammond@skippinet.com.au (Mark Hammond) Date: Tue, 27 May 1997 09:52:27 +1000 Subject: [PYTHON IMAGE-SIG] New PIL experiment. Message-ID: <199705262354.JAA29174@minotaur.labyrinth.net.au> I see a few other people got sick of the Tkinter FAQ too :-) So I took the latest PIL binaries from www.python.org, and wraped it up in the new installation package. The installer: * correctly finds Python's installation, and suggests you install under there. * Installs Tk and Tkinter correctly, and sets the environment variables. On 95 this is done via Autoexec.bat, on NT this is done via the registry (unfortunately, both require a reboot when done) * Allows uninstall etc. * Works :-) On the down side: * Requires a Pythonwin 1.0 install to work. * Does not allow you to specify your own TK or TCL directories - always installed under the core install directory (default is "{Python}\Imaging" * No readme.. You can find it at http://starship.skyport.net/crew/mhammond/pil.exe It would be really cool if some people on these SIGS (especially people who dont yet have PIL yet) could give this a try and see if it works. Please remember than my intention is to split the Pythonwin installation into a few packages. Thus, in the future it will _not_ be necessary to have installed Pythonwin - only to have installed via "setup" the "core Python binaries". There will then be a few "Extension installers", of which Pythonwin (and win32com) will be just a few. Mark. ---------------------------------------------------------------------- Mark Hammond - MHammond@skippinet.com.au Check out Python - _the_ language for the Web/CGI/Windows/MFC/Unix/etc & _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From pa@tekla.fi Tue May 27 07:45:44 1997 From: pa@tekla.fi (Harri Pasanen) Date: Tue, 27 May 1997 09:45:44 +0300 Subject: [PYTHON IMAGE-SIG] Re: [PYTHONWIN-SIG] New PIL experiment. In-Reply-To: <199705262354.JAA29174@minotaur.labyrinth.net.au> References: <199705262354.JAA29174@minotaur.labyrinth.net.au> Message-ID: <9705270645.AA32205@tahma.tekla.fi> Mark Hammond writes: > I see a few other people got sick of the Tkinter FAQ too :-) > > So I took the latest PIL binaries from www.python.org, and wraped it up in > the new installation package. The installer: > * correctly finds Python's installation, and suggests you install under > there. > * Installs Tk and Tkinter correctly, and sets the environment variables. > On 95 this is done via Autoexec.bat, on NT this is done via the registry > (unfortunately, both require a reboot when done) Actually, I don't think reboot is necessary on NT, not for setting the environment variables anyway. Instead of reboot you can lauch Control Panel/System, view the environment page, you'll see the new environment variables from registry there. Just press Ok to close System, and presto, your environment variables are in effect. > * Allows uninstall etc. > * Works :-) Doesn't work for me ;-(, see below. > > On the down side: > * Requires a Pythonwin 1.0 install to work. > * Does not allow you to specify your own TK or TCL directories - always > installed under the core install directory (default is "{Python}\Imaging" > * No readme.. > > You can find it at > http://starship.skyport.net/crew/mhammond/pil.exe > > It would be really cool if some people on these SIGS (especially people who > dont yet have PIL yet) could give this a try and see if it works. > I gave it a short run-a-round, but unfortunately no go. PythonPath is not set up correctly, it omits the Imaging/Lib directory. I tweaked it from the registry to read [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.4.0\PythonPath\Imaging] @="d;\\PythonWin\\Imaging;d:\\PythonWin\\Imaging\\Lib;d:\\PythonWin\\Lib\\Tkinter" Another option would be to replace the "d;\\PythonWin\\Imaging" with "d;\\PythonWin\\Imaging\\Lib" and move the dll files from Imaging to the Lib directory. This would be cleaner in my mind. After the path modification viewer.py manages to run. It however terminates to a weird traceback: [d:\pythonwin\imaging]..\python Scripts\viewer.py Images\lena.gif Traceback (innermost last): File "Scripts\viewer.py", line 36, in ? im = Image.open(filename) File "d:\PythonWin\Imaging\Lib\Image.py", line 467, in open init() File "d:\PythonWin\Imaging\Lib\Image.py", line 84, in init for f in os.listdir(p): nt.error: (3, 'No such process') This looks weird enough for me to quit at this point and let the specialists step in ;-) > Please remember than my intention is to split the Pythonwin installation > into a few packages. Thus, in the future it will _not_ be necessary to > have installed Pythonwin - only to have installed via "setup" the "core > Python binaries". There will then be a few "Extension installers", of > which Pythonwin (and win32com) will be just a few. > Looking forward to that. Harri _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________ From pa@tekla.fi Tue May 27 11:25:51 1997 From: pa@tekla.fi (Harri Pasanen) Date: Tue, 27 May 1997 13:25:51 +0300 Subject: [PYTHON IMAGE-SIG] Re: [PYTHONWIN-SIG] New PIL experiment. In-Reply-To: <199705262354.JAA29174@minotaur.labyrinth.net.au> References: <199705262354.JAA29174@minotaur.labyrinth.net.au> Message-ID: <9705271025.AA03326@tahma.tekla.fi> Mark Hammond writes: > I see a few other people got sick of the Tkinter FAQ too :-) > > So I took the latest PIL binaries from www.python.org, and wraped it up in > the new installation package. I missed the above line, and thought that you had wrapped up the release Fredrik just announced. I tried also Fredrik's release, and that works without any problems. Also, it includes newer version of Tcl/Tk that changes the look and feel of Tk to be more native on Windows. Harri _______________ IMAGE-SIG - SIG on Image Processing with Python send messages to: image-sig@python.org administrivia to: image-sig-request@python.org _______________