Skip to content
Related Articles

Related Articles

Improve Article
Python – blue_shift() function in Wand
  • Last Updated : 08 May, 2020

Blue shift effect make the colors dull by shifting blue values by a factor. A nighttime kind of scene is generated using this. This takes only one parameter factor. A lot of photo editors use this effect to give a night exposure effect to the image.

Syntax :

wand.image.blue_shift(factor)

Parameters :

ParameterInput TypeDescription
factornumbers.RealAmount to adjust values.

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:
  
    # Blueshift effect using blue_shift() function
    img.blue_shift(factor = 1.25)
    img.save(filename ="bs_koala.jpeg")

Output:

Example 2: Increasing value of factor to 1.5 .




# Import Image from wand.image module
from wand.image import Image
  
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
  
    # Blueshift effect using blue_shift() function
    img.blue_shift(factor = 1.5)
    img.save(filename ="bs_koala_2.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 :