find image resolution python code example
Example 1: python get image dimensions
from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
Example 2: image resolution extracting python
from PIL import Image, ExifTags
img = Image.open("/path/to/file.jpg")
exif = { ExifTags.TAGS[k]: v for k, v in img._getexif().items() if k in ExifTags.TAGS }