[Image-SIG] [image-sig] controlling brightness of the image

Amos Newcombe anewc2 at gmail.com
Sat Jan 12 00:24:53 CET 2008


According to the docs, this should be the code:

import Image
import ImageFilter
import ImageEnhance

file2 = "xyz.jpg"
img2 = Image.open(file2)
ench = ImageEnhance.Brightness(img2)
img2 = ench.enhance(2) # change the factor 2 to fit your application
img2 = img2.filter(ImageFilter.SHARPEN)
img2.save("xyz1.jpg" + ext, "JPEG", quality=100)


It says Brightness doesnt have attributes save and filter ?
>

A brightness enhancer doesn't. An image does.

(I haven't checked your other steps. The save() call looks unnecessarily
complicated, but I don't know what code you've cut out.)

Amos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20080111/5acf1361/attachment.htm 


More information about the Image-SIG mailing list