2948 explained code solutions for 75 technologies


python-pillowHow to rotate image 90 degrees


from PIL import Image, ImageEnhance

im = Image.open('/var/www/examples/heroine.png')
im = im.rotate(90)

im.show()ctrl + c
PIL

import Pillow package modules

Image.open

open given image with Pillow

.rotate(

rotate given image

90

degrees to rotate given image by

.show()

displays resulting image