Open In App

Wand flop() function in Python

Last Updated : 10 Mar, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

In this article we will learn what is flop() function. Basically this function returns a flipped image. Flop effect flops an image upside-down or creates an vertical reflection of image. No arguments are needed in this function.
 

Syntax : wand.image.flop()
Parameters : No Parameters in flop() function.


Example 1:
Source Image: 
 


 

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:
        # flopped image using flop() function
        fimg.flop()
        fimg.save(filename ='koalaflopped.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:
        # flopped image using flop() function
        fimg.flop()
        fimg.save(filename ='manflopped.jpeg')

Output: 
 


 


Next Article
Article Tags :
Practice Tags :

Similar Reads