Getting image informations

Mark Hadfield m.hadfield at niwa.co.nz
Mon May 20 17:52:34 EDT 2002


"Gerhard Häring" <gerhard at bigfoot.de> wrote in message
news:mailman.1021928082.23874.python-list at python.org...
> * Sebastian Roth <xsebbi at gmx.de> [2002-05-20 22:35 +0200]:
>>
>> I'm currently looking for an function that give informations about
>> an image/pictire -file like test.png oder test.gif. I need
>> especially two informations: width and heigth .
>>
>> Midnight Commander can tell me this things, but how could Python do
>> that? Is there an special module for such things?
>
> The Python Imaging Library (PIL)
> http://www.pythonware.com/products/pil/

If the reason for wanting the width and height of an image file is to
embed it in an HTML page, then you may find it convenient to use
HTMLgen:

  http://starship.python.net/crew/friedrich/HTMLgen/html/main.html

--
Mark Hadfield            "Ka puwaha et tai nei, Hoea tatou"
m.hadfield at niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)





More information about the Python-list mailing list