I\'m looking for a fast way to get the height and width of an image in pixels. It should handle at least JPG, PNG and TIFF, but the more the better. I emphasize
tldr: file "imagename" will do
works with webp, all jpg formats (jpeg,jpg200,..),
Sample output looks like
JPEG image data, JFIF standard 1.02, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 650x400, frames 3
load the output of file to a python list & use the 4'th field in the list.
FYI, did optimize around 18000+ images to cut down network traffic.