<sect1><title>Selection of an image format for graph display</title>
<para>
Much thought was expended on which image format to use for the plots displayed in the <command>GDMS Internet interface</command>. There are advantages and disadvantages to all the formats available at the time of writing this document. The following formats were considered for the <command>GDMS Internet interface</command>:
</para>

<sect2><title>Tagged Image File Format</title>
<para>
TIFF (Tagged Image File Format) is a raster (bitmap) image format which was originally produced by Aldus and Microsoft. Aldus was later acquired by Adobe, who manage the TIFF specification to this day. At the time of writing, the current version of the TIFF specification is TIFF version 6.0 (Adobe 1992). It should be noted that no significant development of the TIFF standard has occurred since that date.
</para>

<para>
The main advantage of the TIFF image format is that it is extremely mature. It has a large selection of options to ease the development of imaging software, for example the developer can use which ever endian representation is convenient for them, as well as such fundamental parameters as photometric interpretation, whether a high value is lighter or darker than a low value for a given colour sample within a pixel (Adobe 1992). There is also a stable, well supported Open Source application programmers interface available to manage creation and interpretation of images within the TIFF format (Warmerdam &amp; Welles 2002). The interface to this library does not frequently change, which is also an advantage for future portability of the <command>GDMS Internet interface</command>.
</para>

<para>
However, some of these advantages lead to the principal disadvantages that the TIFF format suffers from. Because the content of the file is so loosely specified, it is quite hard to write an application which can correctly decode all possible TIFF format images. This has resulted in there being only a few high quality TIFF viewing applications being available. The relative difficultly of implementing a TIFF decoder has also resulted in the web browser support for TIFF images being very poor (Bither 2002).
</para>

<para>
TIFF is therefore an inappropriate image format for use for the <command>GDMS Internet interface</command>, as good browser support in as many browsers as possible is vital.
</para>
</sect2>

<sect2><title>Graphics Interchange Format</title>
<para>
The Graphics Interchange Format (GIF) was co-developed by CompuServe Inc. and Unisys Corporation in the late 1980s and early 1990s. GIF is dependant on LZW compression (CompuServe 1990), which is now having it's patent enforced by Unisys (Anonymous 2002). The GIF format itself is quite limited, with a maximum palette size of 255 entries &mdash; in other words 255 distinct colours are available in each image.
</para>

<para>
Vendors are also dropping support for the GIF format because of the expense of licensing the Unisys LZW patent, for example, the Open Source <emphasis>libgif</emphasis> is no longer supported for the creation of GIF images (Raymond, 1998).
</para>

<para>
Despite all of these largely political issues, the GIF format is still well supported in all web browser versions, which would make it an ideal candidate for the <command>GDMS Internet interface</command> if it wasn't for the lack of a stable and reliable compression library.
</para>
</sect2>

<sect2><title>Joint Picture Experts Group File Interchange Format</title>
<para>
JPEG is an interesting image format because whilst the JPEG compression codec has been standardized by ISO, the actual on disc format commonly called JPEG is not part of the ISO standard. The file format commonly called JPEG is actually JPEG JFIF &mdash; created by the Independent JPEG Group (Lilly 1996).
</para>

<para>
JPEG support in web browsers is excellent, with support rapidly improving after 1996 (Lilly 1996). The biggest factor stopping the use of JPEG within the <command>GDMS Internet interface</command> is that the compression codec is lossy.
</para>

<sect3><title>Loss</title>
<para>
The JPEG compression algorithm is lossy &mdash; in other words, the act of compressing the image results in image data being discarded. This has the effect of noticeably reducing the clarity of the images &mdash; a characteristic which is especially noticeable with images which contain text at smaller point sizes. The use of such text is a feature of the <command>GDMS</command> graphing subsystem.
</para>

<para>
For example, JPEG compressing the following image results in the following output image:
</para>

<figure><title>The UC logo before JPEG compression</title>
<execute><cmd>eqimg</cmd><args>tiff-figure4.jpg</args></execute>
</figure>

<figure><title>The UC logo after it has been JPEG compressed</title>
<execute><cmd>eqimg</cmd><args>tiff-figure6.jpg</args></execute>
</figure>

<para>
This output is acceptible, because there is limited use of fine detail, and therefore limited loss of image clarity. The effects are much worse with an image which contains text at small point sizes:
</para>

<figure><title>A sample GDMS plot before JPEG compression</title>
<execute><cmd>eqimg</cmd><args>tiff-figure5.png</args></execute>
</figure>

<figure><title>A sample GDMS plot after it has been JPEG compressed</title>
<execute><cmd>eqimg</cmd><args>tiff-figure7.jpg</args></execute>
</figure>

</sect3>
</sect2>

<sect2><title>Portable Network Graphics</title>
<para>
Portable Network Graphics (PNG) was initially developed because of the patent problems with the GIF format described earlier in this section. The PNG format has since grown well past the feature set provided by GIF, and now rivals TIFF for completeness (Randers-Pehrson 1999).
</para>

<para>
The PNG support in many browsers is not perfect. However, browsers above version three for both Netscape and Microsoft Internet Explorer, and all versions of Mozilla have excellent support of PNG. There is an actively maintained and well supported Open Source programmers interface to the PNG format, in fact it is the reference implementation of the specification (Roelofs 2002), which reinforces it's stability.
</para>
</sect2>

<sect2><title>Conclusion</title>
<para>
Based on the factors outlined above, the PNG image format was selected for the <command>GDMS Internet interface</command>. This is because of it's excellent browser support in modern browsers, as well as it's mature and stable Open Source application programmers interface.
</para>
</sect2>
</sect1>
