Pappu19

Image Rotation

Sep 16th, 2021
619
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from PIL import Image
  2.  
  3. colorImage  = Image.open("Image.png")
  4.  
  5. rotated_45     = colorImage.rotate(45)
  6. rotated_90 = colorImage.rotate(90)
  7. rotated_135 = colorImage.rotate(135)
  8. rotated_180 = colorImage.rotate(180)
  9.  
  10. colorImage.show()
  11. rotated_45.show()
  12. rotated_90.show()
  13. rotated_135.show()
  14. rotated_180.show()
RAW Paste Data