python check image dimensions code example
Example 1: python get image dimensions
from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
Example 2: get resolution of image python
img = Image.open("test.png")
img = img.size
# img.size is a tuple