Answers for "PIL image shape"

8

pil get image size

from PIL import Image

im = Image.open('whatever.png')
width, height = im.size
Posted by: Guest on April-01-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
1

python get image size

from PIL import Image

img = Image.open('path/to/image')
width, height = img.size
im.close()
Posted by: Guest on December-20-2020

Browse Popular Code Answers by Language