On Apr 6, 6:09 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 6 Apr 2007 04:02:52 -0700, "Christoph Krammer" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Hello everybody, > > > I need to get the different frames from a GIF image in my python > > script and want to use the giftopnm program from netpbm to get the > > frames and directly convert them to pnm files. I tried to use the > > following code: > > > for image in images: > > if (image[0:3] == 'GIF'): > > What type of data /is/ "image" that the FIRST three characters > identify the type? If it's the name of the file (I don't know what > giftopnm requires for input) I'd have expected the last three to > identify.. > [snip] FYI, the first 3 bytes of a GIF image are the ASCII characters "GIF".
-- http://mail.python.org/mailman/listinfo/python-list