VOOZH about

URL: https://www.geeksforgeeks.org/python/python-pil-image-transpose-method/

⇱ Python PIL | Image.transpose() method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python PIL | Image.transpose() method

Last Updated : 17 Jun, 2021

PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions, including functions to load images from files, and to create new images.
Image.transpose() Transpose image (flip or rotate in 90 degree steps)
 

Syntax: Transpose image (flip or rotate in 90 degree steps)
Parameters
method – One of PIL.Image.FLIP_LEFT_RIGHT, PIL.Image.FLIP_TOP_BOTTOM, PIL.Image.ROTATE_90, PIL.Image.ROTATE_180, PIL.Image.ROTATE_270 or PIL.Image.TRANSPOSE.
Returns type: An Image object.
 


Image Used: 
 

👁 Image


 

Output: 
 

👁 Image


Another example:Here the transform parameter are changed. 
Image Used 
 

👁 Image


 

Output: 
 

👁 Image


 

Comment
Article Tags:
Article Tags: