Wand vignette() function in Python
Vignette effect creates a soft and blurry elliptical frame to the image. Vignette effect is used to apply focus to the part of image we want. The x & y arguments are used to control edge of the ellipse inset from the image border, and radius & sigma argument to control the blurriness. The radius can be omitted if you wish ImageMagick to select a value from the defined sigma value.
Syntax :
wand.image.vignette(radius, sigma, x, y)
Parameters :
Parameter |
Input Type |
Description |
radius |
numbers.Real |
The radius of the Gaussian |
sigma |
numbers.Real |
The standard deviation of the Gaussian, in pixels |
x |
numbers.Integer |
x-edge of ellipse |
y |
numbers.Integer |
y-edge of ellipse |
Source Image:
Example 1:
Python3
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.vignette(sigma = 3 , x = 10 , y = 10 )
img.save(filename = "vkoala.jpeg" )
|
Output:
Example 2: Increasing sigma value
Python3
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.vignette(sigma = 10 , x = 1 , y = 1 )
img.save(filename = "vkoala2.jpeg" )
|
Output:
Last Updated :
16 Oct, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...