Skip to content
Related Articles

Related Articles

Wand sepia_tone() function – Python
  • Last Updated : 08 May, 2020

sepia_tone() simulate old style silver based chemical photography printing. sepia_tone() function apply sepia toning to images.

Syntax :

wand.image.sepia_tone(threshold)

Parameters :

ParameterInput TypeDescription
thresholdnumbers.RealThe extent of the toning. Value can be between 0 & quantum_range, or 0 & 1.0. Default value is 0.8 or “80%”.

Source Image:

Example 1:






# Import Image from wand.image module
from wand.image import Image
  
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
  
    # Sepia simulation using sepia_tone() function
    img.sepia_tone(threshold = 0.6)
    img.save(filename ="sepiakoala2.jpeg")

Output:

Example 2: Increasing threshold value.




# Import Image from wand.image module
from wand.image import Image
  
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
    # Sepia simulation using sepia_tone() function
    img.sepia_tone(threshold = 1)
    img.save(filename ="sepiakoala.jpeg")

Output:

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up
Recommended Articles
Page :