Showing the Colour Table of a GIF.

This script will display the colours in the colour table used by the first frame of a GIF.

The script can be downloaded here - showpalette.zip. The image path is hard coded but this
can easily be changed to read an image of your choice. To run the script the trial version of the csASPGif component must be registered.
Click Here to download the component.

This is the GIF image.

Here is a listing of the script. Much of it is devoted to making the colours display in a square table and this is done by counting
the rows and columns. The GIF could use a Global Colour Table or a Local Colour Table and this is taken care of with a
<cfif> tag. If a multi-frame GIF is loaded only the first frame will be used.

There is an alternative method available in Cold Fusion MX which uses the
PageContext Java Object and this can stream images directly to the browser without saving to a temporary
file first. The is more information in the Cold Fusion section in the
online manual.