check the size of the image in python code example
Example: python get image size
from PIL import Image
img = Image.open('path/to/image')
width, height = img.size
im.close()
from PIL import Image
img = Image.open('path/to/image')
width, height = img.size
im.close()