Reducing the size of animated GIFs

There's no getting away from the fact that animated GIFs are large. They're basically a set of multiple GIFs in one file. If you don't take steps to minimized their size, then you could be sending unnecessarily large files across the Internet. Fortunately, there are a number of ways of keeping the size down:

As an example, the animation in the tutorial used a limited set of colors from the standard Netscape palette and each GIF was saved undithered with a standard palette. There was no visible loss of quality over a version saved with an optimized palette and error-diffusion, but the resulting animated GIF was nearly halved in size from 42.4K to 22.4K.

Partial animation Even 22.4K could be considered too large, and you can often push the size even smaller with a little work. As you can see, the word 'GIF' never needs to be re-drawn and at most six characters change positions between consecutive frames. You could make only the first frame show 'GIF' and make the other frames show only those characters which are moving. Put a white rectangle behind the letters to blank out characters underneath. (In the illustration we've made the rectangle green so you can see it.) For best results you need to turn on Snap to Grid (on the Window menu) and make sure the rectangles are snapped to the grid. You'll also need to make the grid spacing smaller, say to 2 pixels. Lastly set the Overlay ('O') flag in the Frame Gallery for the second and subsequent frames. This brings the size down to 16K.

Also for the first few frames nothing changes. You could delete these intermediate frames and increase the delay after displaying the first frame that shows 'Animated GIF'.

Did this page help you? If not, please email us to tell us why not so we can improve it.

_______________

© Copyright Xara Ltd: page last updated 20 Aug 1997
For more information, contact webmaster@xara.com.