Friday, September 5, 2025
HomeLanguagesWand implode() function – Python

Wand implode() function – Python

implode() generates a kind of distorted image in which pull effect is noticed into the middle of the image. The amount argument controls the range of pixels to pull towards the center.

Syntax :

wand.image.implode(amount, method)

Parameters :

Parameter Input Type Description
amount numbers.Real Normalized degree of effect between 0.0 & 1.0./td>
method basestring Which interpolate method to apply to effected pixels.

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:
 
    # imploded image using implode() function
    img.implode(amount = 0.35)
    img.save(filename ="impkoala.jpeg")


Output:

  

Example 2: Increasing amount value 

Python3




# Import Image from wand.image module
from wand.image import Image
 
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
    # imploded image using implode() function
    img.implode(amount = 0.5)
    img.save(filename ="impkoala2.jpeg")


Output:

 

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

Most Popular

Dominic
32265 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6634 POSTS0 COMMENTS
Nicole Veronica
11801 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11864 POSTS0 COMMENTS
Shaida Kate Naidoo
6752 POSTS0 COMMENTS
Ted Musemwa
7025 POSTS0 COMMENTS
Thapelo Manthata
6703 POSTS0 COMMENTS
Umr Jansen
6718 POSTS0 COMMENTS