Varsha Purohit wrote:
> Hello All,
>          I am using PIL function to change brightness of an image. But i 
> am getting an error when i am trying to save that image. Here is the code..
> 
> import Image
> import ImageChops, ImageEnhance
> import math, operator
> 
> file1 = Image.open("r10001t0.jpg")
> file2 = Image.open("r10001t1.jpg")
> 
> diff = ImageChops.difference(file1,file2)
> 
> enhancer = ImageEnhance.Brightness(diff)

This creates an ImageEnhance.Brightness instance. Then you need 
something like
enhanced = enhancer.enhance(2.0)

after which enhanced is the enhanced image that you should save.

Kent
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to