Friday, October 10, 2025
HomeLanguagesWand gamma() function in Python

Wand gamma() function in Python

gamma() allows us to adjust the luminance of an image. Resulting pixels are defined as pixel^(1/gamma). The value of gamma is typically between 0.8 & 2.3 range, and value of 1.0 will not affect the resulting image.

Parameters :

Parameter Input Type Description
adjustment_value numbers.Real value to adjust gamma level.
channel basestring optional channel to apply gamma correction.
Example:

Source Image:




# Import Image from wand.image module
from wand.image import Image
  
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
    img.gamma(1.35)
    img.save(filename ="kl-gamma.jpeg")


Output :

Example 2: Increasing adjustment_value to 1.75.




# Import Image from wand.image module
from wand.image import Image
  
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
    img.gamma(1.75)
    img.save(filename ="kl-gamma2.jpeg")


Output :

Last Updated :
10 May, 2020
Like Article
Save Article

<!–

–>

Similar Reads
Related Tutorials
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32349 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6717 POSTS0 COMMENTS
Nicole Veronica
11880 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6838 POSTS0 COMMENTS
Ted Musemwa
7097 POSTS0 COMMENTS
Thapelo Manthata
6792 POSTS0 COMMENTS
Umr Jansen
6792 POSTS0 COMMENTS