Giffy is an application that integrates multiple Gif images into a Gif89a file and let users to customize the Netscape Extension loop as well as their desired comment. First, we have to write a GIF89aEncoder class used for reading and encoding images to a single image. However, Java has its own decoder that can read both GIF and JPEG file format, Giffy then allow users to make a Gif89a file from both formats. Note that if users use JPEG images that contain more than 256 colors, the quality of such images may be degraded because Gif format can support only 256 colors.
In Gif89aEncoder class we use MediaTracker class to grab pixel values (RGB value) in each image. After that, an encoder will start writing Gif89a file format into an output file. The Gif89a format is shown below.
In addition to Giffy, Gifin is an additional application that can generate a Gif89a file from its own engine. The idea behind Gifin is that when html authors want to decorate their homepage, sometimes they have to use java applet for making text effects. However, the applet is not convenient for typical html authors(beginners) to understand and configure its parameters. Morever, some applet classes are quite large compared to Gif file, so they may require more bandwidth and time to download. Gifin then solves such problems by converting a text effect applet to a Gif89a file and let users to choose their desired effects as well.
These are images generated by Gifin
Giffy Source code: Gifin.java,
More about Gif87a
Specification and LZW algorithm