Wand flip() function in Python
In this article we will learn what is flip() function. Basically this function returns a flipped image. Flip effect flips an image upside-down or creates an vertical reflection of image. No arguments are needed in this function.
Syntax : wand.image.flip()
Parameters : No Parameters in flip() function.
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: with img.clone() as fimg: # flip image using flip() function fimg.flip() fimg.save(filename = 'koalaflipped.jpeg' ) |
Output:
Example 2:
Source Image:
Python3
from wand.image import Image # Read image using Image function with Image(filename = "man.jpeg" ) as img: with img.clone() as fimg: # flip image using flip() function fimg.flip() fimg.save(filename = 'manflipped.jpeg' ) |
Output: