GIF Image Size

Rindolf rindolf2 at yahoo.comNOSPAM
Wed Jan 3 00:00:48 EST 2001


"Rindolf" <rindolf2 at yahoo.comNOSPAM> wrote in message
news:Ifw46.28043$F_3.1077811 at newsread2.prod.itd.earthlink.net...
> "Greg Landrum" <glandrum at my-deja.com> wrote in message
> news:92tbig$ede$1 at nnrp1.deja.com...
> > In article <Wxp46.24381$F_3.940941 at newsread2.prod.itd.earthlink.net>,
> >   "Rindolf" <rindolf2 at yahoo.comNOSPAM> wrote:
> > > Is there any way to find out the dimensions of a GIF image using
> > python? I
> > > looked in the language reference and it didn't look like there was.
> > >
> >
> > If you are going to be working with GIFs (or any image format for that
> > matter), you probably want to install PIL:
> > http://www.pythonware.com/products/pil/index.htm
> > Once you have that installed, you can easily determine the size of a GIF
> > as follows:
> > from Pil import Image
> > img = Image.open('foo.gif')
> > print img.size
> >
> > I hope this helps,
> Thank you! Btw, what type of object is img.size, and what is the class of
> object returned by Image.open()?
Um, I just downloaded it, how do I use it in windows? I have python 2.0
installed in C:\Python20. Help?

Rindolf





More information about the Python-list mailing list