ในโปรแกรมนี้ เราจะหมุนภาพโดยใช้ไลบรารี่หมอน ฟังก์ชัน turns() ในคลาส Image ใช้มุมของการหมุน
ภาพต้นฉบับ

อัลกอริทึม
Step1: Import Image class from Pillow. Step 2: Open the image. Step 3: Rotate the image. Step 4: Display the output.
โค้ดตัวอย่าง
from PIL import Image
im = Image.open('testimage.jpg')
im.rotate(45).show() ผลลัพธ์
