getting size of gif

Cameron Laird claird at lairds.com
Tue Mar 9 22:37:15 CET 2004


In article <9L2dna_mgLuovNPd4p2dnA at comcast.com>,
Larry Bates <lbates at swamisoft.com> 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; it just takes a couple
of byte-twiddles.  <URL: http://wiki.tcl.tk/758 > can
easily be translated into pure Python.
-- 

Cameron Laird <claird at phaseit.net>
Business:  http://www.Phaseit.net



More information about the Python-list mailing list