xxxxxxxxxx
from PIL import Image
# Open an image file
image = Image.open("path/to/image.jpg")
# Show the image
image.show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
import glob, os
size = 128, 128
for infile in glob.glob("*.jpg"):
file, ext = os.path.splitext(infile)
with Image.open(infile) as im:
im.thumbnail(size)
im.save(file + ".thumbnail", "JPEG")
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()
xxxxxxxxxx
from PIL import Image
with Image.open("hopper.jpg") as im:
im.rotate(45).show()