Re: [Image-SIG] Lanczos interpolation

2009-06-02 Thread Franz Buchinger
A good old trick is to work with intermediate images: resize the image using the Bilinear method and produce an intermediate image that is about 25% larger than the final image. Then you can downscale the intermediate image using Lanczos. This should give a much better performance than working

Re: [Image-SIG] Reading title EXIF data

2009-06-02 Thread Franz Buchinger
PIL is an excellent image processing library, but unfortunatly not a tool of choice when you want to deal with EXIF data seriously. It only extracts a subset of the EXIF-Data contained in an image, for a more complete library you may want to check pyexiv2 (python wrapper for exiv2). And beware,

[Image-SIG] Python Core Graphics Question (resent)

2009-06-02 Thread Geert Dekkers
Hi all (I just resent this message as I couldn't it find it on the digest even after days - again, I apologise for any cross-posting) Below is a piece of code that I found over in the quartz-dev list. I've been using this function unchanged in a batch processor, and it appears to leak

Re: [Image-SIG] Python Core Graphics Question (resent)

2009-06-02 Thread Fredrik Lundh
On Tue, Jun 2, 2009 at 9:13 PM, Geert Dekkers ge...@nznl.com wrote: (I just resent this message as I couldn't it find it on the digest even after days - again, I apologise for any cross-posting) It's in the image-sig archive, at least:

Re: [Image-SIG] im.show() using eog doesn't work second time

2009-06-02 Thread Fredrik Lundh
On Wed, Jun 3, 2009 at 12:28 AM, Dan Halbert halb...@halwitz.org wrote: I'm using PIL 1.1.6 on Ubuntu jaunty, and noticed a problem with invoking im.show() more than once without closing the image viewing window. On this system, im.show() uses eog to view the images. If you do something like:

Re: [Image-SIG] im.show() using eog doesn't work second time

2009-06-02 Thread Dan Halbert
Fredrik Lundh wrote: On Wed, Jun 3, 2009 at 12:28 AM, Dan Halbert halb...@halwitz.org wrote: I'm using PIL 1.1.6 on Ubuntu jaunty, and noticed a problem with invoking im.show() more than once without closing the image viewing window. On this system, im.show() uses eog to view the images.

Re: [Image-SIG] Lanczos interpolation

2009-06-02 Thread Douglas Bagnall
If you want the downsampling algorithm used by the Gimp and (I think) Photoshop, try: def stretch(im, size, filter=Image.NEAREST): im.load() im = im._new(im.im.stretch(size, filter)) return im In 2005 I found it to be a few times quicker than ANTIALIAS resizing, and the results were