home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


where cb is the hexadecimal code for the decimal number 203. If you run giftrans without arguments, the program prints a list of the possible arguments and their meanings.

Giftrans is available from many anonymous FTP sites. Its original home is:

ftp://ftp.rz.uni-karlsruhe.de/pub/net/www/tools/

The file giftrans.exe is the DOS/Windows executable, giftrans.os2.exe is the OS/2 version, and giftrans.c is C source code (you will also need the file getopt.c if compiling on a PC). Last, giftrans.1 is the UNIX-style manual page.

The program xv is available from many anonymous FTP sites. You will need both a C compiler and the standard X11 libraries to compile xv on your machine. Xv is available at:

ftp://ftp.cis.upenn.edu/pub/xv/

GIFtool (UNIX, MS-DOS)

GIFtool is a multipurpose shareware GIF manipulation program from HomePages (www.homepages.com) that lets you add interlacing or transparency to GIF images. GIFtool can be used in batch mode to convert multiple files at the same time. The program is available at:

ftp://ftp.ies.lafayette.in.us/pub/dos/giftool.exe (DOS)
ftp://sunsite.unc.edu/pub/Linux/apps/graphics/convert/ (UNIX)

PhotoShop Transparent GIF Plugin

Oddly enough, commercial programs such as PhotoShop and CorelDraw cannot create transparent GIF images. Fortunately, Adobe provides a free PhotoShop plugin that does these tasks. This plugin can be obtained (in Macintosh, Windows, and UNIX versions) at:

www.adobe.com/supportservice/custsupport/LIBRARY/psmac.htm
www.adobe.com/supportservice/custsupport/LIBRARY/pswin.htm
www.adobe.com/supportservice/custsupport/LIBRARY/psunix.htm

Similar plugins are available for other commercial packages—check with your software vendor for details.

Animated GIFs

Netscape Navigator 2.0 introduced support for animated GIF images: GIF images that display like short movie sequences. GIF89A lets a single GIF file contain a sequence of images of the same height and width—the file can be an archive of images, stored sequentially. Of course, if the stored files are subsequent frames of a short animation sequence, and you can display them one after the other, then . . . voila!—you have an animation. In fact, the GIF format lets you specify: the time delay (in 100ths of a second) between subsequent frames; whether the animation should start automatically or upon user selection of the image; and how the sequence should be treated after it has been displayed (should it cycle in a loop, or stop). The latter is a special extension implemented by Netscape—the GIF89A format allows for such proprietary extensions of the file format.

Browsers that can’t display GIF animations ignore all this—when such browsers encounter an animated GIF file, they simply display the first or last picture in the file.

Creating Animated GIFs

You need special software to create an animated GIF sequence. In general, you prepare the animation as a collection of single GIF images, and paste them together using a GIF animation tool. In general, you want the frames to be small, and as with all GIF images, you want to use as few colors as possible—animated GIF files are much larger than single-frame pictures, so you want to reduce the size of the frames as much as possible. URLs listing GIF animation software are given at the end of this section, while most commercial HTML editors (e.g., SoftQuad HoTMetaL, Microsoft FrontPage, Adobe PageMill, or Sausage Software’s HotDog) come equipped with animated GIF tools. These tools are in general quite easy to use.


NOTE: Animated GIF Problems with Older Browsers

Animated GIFs require extra processing to run the animation process. This is not a problem on newer machines with fast processors and lots of memory (16 MB or more). Users with slower machines will find that GIF animations significantly slow down their computers. The moral: Don’t get carried away with animated GIFs!


Placing Animated GIFs in HTML Documents

This is easy—you insert an animated GIF using our friend, the IMG element. For example, if your animated GIFs are in the file anim.gif, then the IMG tag is:

<IMG SRC=“anim.gif” ALT=“animated button” HEIGHT=54 WIDTH=45”>

Browsers that do not support the animated GIF format will display a single frame from the animation. Be warned that some display the first frame, while others display the last—there’s nothing like consistency, is there? One way around this problem is to make the first and last frames identical. This is also useful for looping animations, as making the first and last frames identical (or nearly so) makes the sequence loop smoothly.

Additional Animated GIF Information

There is a wonderful collection of animated GIF resources, provided by Royal Frazier, containing a detailed tutorial on the GIF97 and GIF89A file structures, tutorials on creating animated GIFs, lists of software to help you in this process, and a gallery of animated GIFs created by Royal and others. The URLs for this reference (the second URL lists mirror sites) are:

user.aol.com/royalef/gifanim.htm
user.aol.com/royalef/mirrors.htm
user.aol.com/royalef/toolbox.htm


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.