Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- import cv2
- img = Image.open('peter.jpg')
- rotated_img = img.rotate(90)
- rotated_img2 = img.transpose(Image.ROTATE_90)
- rotated_img.show()
- rotated_img2.show()
- cv2.waitKey(0)
- cv2.destroyAllWindows()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement