Answers for "pil image get shape python reize"

10

python pil resize image

from PIL import Image

# Image.open() can also open other image types
img = Image.open("some_random_image.jpg")
# WIDTH and HEIGHT are integers
resized_img = img.resize((WIDTH, HEIGHT))
resized_img.save("resized_image.jpg")
Posted by: Guest on April-05-2020
1

PIL image shape

from PIL import Image

im = Image.open('whatever.png')
width, height = im.size
Posted by: Guest on May-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language