pil get image size
from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
pil get image size
from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
python get image size
from PIL import Image
img = Image.open('path/to/image')
width, height = img.size
im.close()
python pillow resize image
from PIL import Image
# set the base width of the result
basewidth = 300
img = Image.open('somepic.jpg')
# determining the height ratio
wpercent = (basewidth/float(img.size[0]))
hsize = int((float(img.size[1])*float(wpercent)))
# resize image and save
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
img.save('sompic.jpg')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us