Wand polaroid() function – Python
Last Updated :
08 May, 2020
polaroid() is one of function with simplest functionality. It generates image with a white border with a slight shadow to create a special effect of a Polaroid print.
Syntax :
wand.image.polaroid(angle, caption, font, method)
Parameters :
Parameter |
Input Type |
Description |
angle |
numbers.Real |
applies a shadow effect along this angle. |
caption |
basestring |
Writes a message at the bottom of the photo’s border.
|
font |
wand.font.Font |
Specify font style. |
method |
basestring |
Interpolation method. ImageMagick-7 only. |
Source Image:
Example 1:
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.polaroid()
img.save(filename = "polkoala.jpeg" )
|
Output :
Example 2:
Add caption and angle to image
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.polaroid(angle = 1.0 , caption = "Hi Koala" )
img.save(filename = "polkoala2.jpeg" )
|
Output:
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...