ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
Re: [Image-SIG] ImageEnhance
by Fredrik Lundh other posts by this author
Jun 21 2001 8:25AM messages near this date
[Image-SIG] ImageEnhance | [Image-SIG] PIL can't ID a TIFF.
Jason C. Leach wrote:
>  How do we get images out of ImageEnhance? For example if I:
>  enh = ImageEnhance.Contrast(im)
>  does it change 'im', or a copy of 'im'? What I am trying to do is save
>  'im' after the contrast change.

http://www.pythonware.com/library/pil/handbook/imageenhance.htm

    All enhancement classes implement a common interface,
    containing a single method:

    enhance(factor). Returns an enhanced image. The factor is a
    floating point value controlling the enhancement. Factor 1.0
    always returns a copy of the original image, lower factors
    means less colour (brightness, contrast, etc), and higher values
    more. There are no restrictions on this value.

in other words, something like this should work:

    imOut = enh.enhance(someValue)
    imOut.save(someFileName)

</F> 
Thread:
Jason C. Leach
Jason C. Leach
Fredrik Lundh
Jason C. Leach
Jason C. Leach

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved