The joy of animated GIF

Rob Cozens rcozens at pon.net
Tue Nov 19 12:51:01 EST 2002


>are there any cross-platform
>issues or other problems associated with animated GIFs?

Hi Robert,

There's one important caveat Scott Raney posted a few days ago:

>>
about that plan of using a GIF as an image library.  It's bad
idea because the frames are all decompressed ahead of time, chewing up
large amounts of RAM for no good reason unless you're actually going
to use it for animation where performance is more important than
memory requirements.
<<

As I replied to Scott, I don't think this rules out animated gifs 
totally (see ClickClock); but as a library of large images it may not 
be the best approach.

OTOH, if your design alternative is to load all the images in a stack 
(as opposed to referencing external image files), putting them in an 
animated gif incurs no RAM hit, just the time to decompress the 
frames when the image is opened.

BTW, it is the frame decompression on opening that allows the MC 
engine to display frame x without first reading frame 1 through x-1.

Also, so far as I can tell, animated gifs cannot be resized, and 
someone else reported they don't rotate correctly.

An obvious point easily overlooked: you can't display multiple frames 
of an animated gif on the same screen at the same time.

That being said animated gifs make eminent sense in controls like 
ClickClock.gif:

   300+ small images that are designed and scripted to be used as a 
set with never a need to be display multiple images or change the 
loaction of the image.
-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)



More information about the use-livecode mailing list