Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Stefano Masini
On 9/8/05, Joao S. O. Bueno Calligaris <[EMAIL PROTECTED]> wrote: > The cenonicakl reference is still the aparently out of date page at: > > www.jamesh.id.au/software/pygimp/ This looks like a way to write python scripts that run _within_ Gimp. In fact, the documentation says the system also take

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Joao S. O. Bueno Calligaris
On Wednesday 07 September 2005 19:59, Ben de Luca wrote: > Could you point me at some information about the gimp scripting in > python. The only python things I found were woefully out of date. > The cenonicakl reference is still the aparently out of date page at: www.jamesh.id.au/software/pygimp

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Ben de Luca
Could you point me at some information about the gimp scripting in python. The only python things I found were woefully out of date. On 08/09/2005, at 3:12 AM, Joao S. O. Bueno Calligaris wrote: > Hi, > > If you can't find an autolevel to use with PIL, maybe yyou can use > the GIMP instead. >

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Chris Barker
Thanks Stefano, this make sit much more clear what's going on. I'll give this code a try. -chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Stefano Masini
In this code all_same defaults to 0. The author says: "I find the BEST way to color/density correct an image is to first set the black/white point for each of the channels individually, so that you use the entire available dynamic range." While this is true, I must point out that you risk skewing t

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Stefano Masini
Autolevel basically works by analyzing the histogram of the image. The histogram of an 8-bit image is basically a set of 256 counters (32767 if working in 16-bit mode) for each channel. Each one counts how many bits are the in the image for the specified intensity value. A pixel with color (100, 20

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Fredrik Lundh
Chris Barker wrote: > I need to do something like Photoshop's Auto Level to a bunch of images. > Honestly, I have only a vague idea of what it does, but I saw that > someone posted a script to do it here about 6 years ago, but I can't > seem to get that code from the list archives. this one? htt

Re: [Image-SIG] Auto level with PIL?

2005-09-07 Thread Joao S. O. Bueno Calligaris
Hi, If you can't find an autolevel to use with PIL, maybe yyou can use the GIMP instead. It is scriptable in python as well. JS -><- On Wednesday 07 September 2005 14:00, Chris Barker wrote: > Hi all, > > I need to do something like Photoshop's Auto Level to a bunch of > images

[Image-SIG] Auto level with PIL?

2005-09-07 Thread Chris Barker
Hi all, I need to do something like Photoshop's Auto Level to a bunch of images. Honestly, I have only a vague idea of what it does, but I saw that someone posted a script to do it here about 6 years ago, but I can't seem to get that code from the list archives. It's also possible that someone

[Image-SIG] ImageChops.logical_and not working?

2005-09-07 Thread Michael Hoffman
Hello. Using PIL 1.1.5, I am trying to do logical ands on bitmap images using ImageChops.logical_and. I seem to always get completely black images instead, however. Here's a simple testcase: """ import Image, ImageChops, ImageDraw im1 = Image.new("1", (50, 50)) im2 = im1.copy() im3 = im1.copy()