wave() function creates a wave like structure from top and bottom of the image. Creates a ripple effect within the image. We can change wavelength as well as amplitude of the image using amplitude & wave_length parameters in wave() function.
Syntax :
wand.image.wave(amplitude, wave_length)Parameters :
Parameter Input Type Description amplitude numbers.Integer Sets amplitude of wave. wavelength numbers.Integer Sets wavelength of wave.
Source Image:
 
Example 1:Â
Python3
# Import Image from wand.image modulefrom wand.image import ImageÂ
# Read image using Image functionwith Image(filename ="koala.jpeg") as img:Â
    # rippled effect in image using wave() function    img.wave(amplitude = img.height / 32,             wave_length = img.width / 4)    img.save(filename ="wkoala2.jpeg") |
Output :
 
Example 2: Increasing amplitude and decreasing wavelength.Â
Python3
# Import Image from wand.image modulefrom wand.image import ImageÂ
# Read image using Image functionwith Image(filename ="koala.jpeg") as img:Â
    # rippled effect in image using wave() function    img.wave(amplitude = img.height / 24,             wave_length = img.width / 8)    img.save(filename ="wkoala2.jpeg") |
Output:
Â

… [Trackback]
[…] Find More Information here to that Topic: geeksforgeeks.org/wand-wave-function-in-python/ […]
… [Trackback]
[…] Read More Information here to that Topic: geeksforgeeks.org/wand-wave-function-in-python/ […]