Open In App
Related Articles

Wand implode() function – Python

Improve Article
Improve
Save Article
Save
Like Article
Like

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:

 

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 27 Mar, 2023
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials