Is it possible to get image size before/without downloading?

aldonnelley at gmail.com aldonnelley at gmail.com
Sat Jul 22 04:02:18 EDT 2006


Hi there: a bit of a left-field question, I think.
I'm writing a program that analyses image files downloaded with a basic
crawler, and it's slow, mainly because I only want to analyse files
within a certain size range, and I'm having to download all the files
on the page, open them, get their size, and then only analyse the ones
that are in that size range.
Is there a way (in python, of course!) to get the size of images before
or without downloading them? I've checked around, and I can't seem to
find anything promising...

Anybody got any clues?

Cheers, Al.




More information about the Python-list mailing list