Python Program to find the resolution of a image
def find_res(filename):
with open(filename, 'rb') as img_file:
img_file.seek(163)
a=img_file.read(2)
height=(a[0]<<8)+a[i]
a=img_file.read(2)
width=(a[0]<<8)+a[1]
print("Image Resolution is :",width, "x", height)
find_res("C:\Python3.7.4\Icon.jpg")
Output:
Image Resolution is : 2560 x 1600