Skip to content
Related Articles

Related Articles

Wand implode() function – Python
  • Last Updated : 08 May, 2020

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 :

ParameterInput TypeDescription
amountnumbers.RealNormalized degree of effect between 0.0 & 1.0./td>
methodbasestringWhich interpolate method to apply to effected pixels.

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

Output:

Example 2:
Increasing amount value




# Import Image from wand.image module
from wand.image import Image
  
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
    # Charcoal fx using charcoal() function
    img.implode(amount = 0.5)
    img.save(filename ="impkoala2.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 :