This worked for me.

open an image object, I'll call im

Write a function that you would like applied to each pixel of im, here
is a dumb one that will just double the value this making the new
image very very bright.

def function(pixel):
    return pixel*2

Then eval the image based on the function

Image.eval(im2,function).show()

or save it to a new image which you can save

newimage=Image.eval(im2,function)

Dennis Shimer


On 1/11/07, Cochran, Travis <[EMAIL PROTECTED]> wrote:
> I'm trying to use the Image.eval function on a JPEG image. I can't seem
> to find the right syntax for entering the function and it gives me
> errors for the variables I try to use, "R,G,B". Any idea what I'm doing
> wrong?
> -Travis Cochran
> _______________________________________________
> Image-SIG maillist  -  Image-SIG@python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to