Richard Russell has provided an excellent little procedure for displaying animated gifs, but what I want to know is, how can I tell if a giff is animated or not? If it is, use the procedure; if not, use the imglib routine. Is there a flag in the gif file which gives the game away?
Thanks.
Detecting animated gifs
Re: Detecting animated gifs
Hi Kendall,
It looks from the Wikipedia article as though there is an indication at &30D? A quick and dirty approach to checking whether there is more than one frame might be to read the first few bytes to extract width and height, and then work out whether the length of the file is much bigger than the size of one image? You'd need to allow for the rest of the header size (palette?).
Hope that's helpful,
D
It looks from the Wikipedia article as though there is an indication at &30D? A quick and dirty approach to checking whether there is more than one frame might be to read the first few bytes to extract width and height, and then work out whether the length of the file is much bigger than the size of one image? You'd need to allow for the rest of the header size (palette?).
Hope that's helpful,
D