getting size of gif
Fredrik Lundh
fredrik at pythonware.com
Sun Mar 14 12:36:30 EST 2004
Cameron Laird wrote:
> >Get PIL (Python Imaging Library) if you don't already have it
> >
> >http://www.pythonware.com/products/pil/index.htm/
> >
> >import Image
> >pathtogif=r'C:\xxx.gif' # Replace with your path
> >im=Image.open(pathtogif)
> >x,y=im.size
> >im.close()
> .
> .
> .
> It doesn't require all of PIL, though, for those who
> have a reason *not* to rely on it
note that you don't need all of PIL to run the above example; it's enough
to install Image.py, ImageFile.py, ImagePalette.py, and the *ImagePlugin.py
files you need for your application. the binary extensions are not needed.
</F>
More information about the Python-list
mailing list