I am using Python 2.5. And using the standard classes from Python, I want to determine the image size of a file.
I\'ve heard PIL (Python Image Library), but it requi
It depends on the output of file which I am not sure is standardized on all systems. Some JPEGs don't report the image size
import subprocess, re image_size = list(map(int, re.findall('(\d+)x(\d+)', subprocess.getoutput("file" + filename))[-1]))