Sunday, June 14, 2026
HomeLanguagesWand wave() function in Python

Wand wave() function in Python

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 module
from wand.image import Image
 
# Read image using Image function
with 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 module
from wand.image import Image
 
# Read image using Image function
with 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:

 

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

2 COMMENTS

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6897 POSTS0 COMMENTS
Nicole Veronica
12013 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7019 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6964 POSTS0 COMMENTS