Determining an Image Size?
gReGlAnDrUm at earthlink.net
Sat May 19 03:01:01 CEST 2001
"Darren Watson" <Darren.Watson3 at ntlworld.com> wrote in message
news:KjiN6.4874$Od1.660453 at news2-win.server.ntlworld.com...
> I know very little about image formats, but I am very interested in
> out if it is possible to determine the dimensions (in pixels) of a JPEG or
> GIF file from a Python script.
If you have PIL installed
(http://www.pythonware.com/products/pil/index.htm), you can just do:
>>> from PIL import Image
>>> img = Image.open('icon.jpg')
I hope this helps,
More information about the Python-list