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
# Import Image from wand.image module from wand.image import Image
# Read image using Image function with Image(filename = "koala.jpeg" ) as img:
# vignette image using vignette() function
img.vignette(sigma = 3 , x = 10 , y = 10 )
img.save(filename = "vkoala.jpeg" )
|
Output:
Example 2: Increasing sigma 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:
# vignette image using vignette() function
img.vignette(sigma = 10 , x = 1 , y = 1 )
img.save(filename = "vkoala2.jpeg" )
|
Output:
Article Tags :