Adobe Photoshop CS5 for Photographers - Martin Evening [307]
Figure 14.6 Here, I took an 8-bit, layered, RGB TIFF image saved with no compression (which was 57.7 MB in size) and saved it using three different methods of TIFF compression. The lossless LZW and ZIP compression methods efficiently reduced the file size to less than half the original size, while the JPEG compression method had the potential to reduce the TIFF file size even further (while being lossy).
GIF
The GIF (Graphics Interchange Format) is normally used for publishing graphic style images such as logos. Some people pronounce GIF with a soft G (as in George) and others use a hard G (as in garage). Neither is right or wrong as both forms of pronunciation are commonly used. Or as Julieanne Kost likes to say: ‘it's pronounced, get a life!’
To save an image using the GIF format, it must start off in 8-bit RGB mode. Saving as a GIF converts the image to Indexed Color mode. This is an 8-bit color display mode where specific colors are ‘indexed’ to each of the 256 (or fewer) numeric values. You can select a palette of indexed colors that are saved with the file and choose to save as a CompuServe GIF. The file is then ready to be placed in a web page and be viewed by web browsers on all computer platforms. Photoshop contains special features to help web designers improve the quality of their GIF outputs (Figure 14.7), such as the ability to preview Indexed mode colors whilst in the Indexed Color mode change dialog box and an option to keep matching colors non-dithered. This feature can help you improve the appearance of GIF images and reduce the risks of banding or posterization. Be aware that when the Preview is switched on and you are editing a large image, it may take a while for the document window preview to take effect, so make sure that you resize the image to the final pixel size first.
Figure 14.7 The GIF file format is mostly used for saving graphic logos and typography. The picture shown here is one that was used for the cover design of an earlier edition of this book. This is also a good example to illustrate the type of image that would be suitable for saving in the GIF format for use on a web page design. Note that the image contains a large amount of solid red and few other colors. This photograph was reduced in size to around 350 × 300 pixels. I then converted the image to Index Color mode using a palette of 16 colors. When the image was saved as a GIF it measured a mere 19 kilobytes.
You will find that when designing graphic images to be converted to a GIF, those with horizontal detail compress better than those with vertical detail. This is due to the GIF format using Run Length Encoding (RLE) compression.
Run Length Encoding (RLE)
This is a simple and popular data compression algorithm in which a long sequence of identical pixel values is replaced by a shorter sequence which summarizes the pixel content. For example, where you have, say, a continuous tone color value repeated in an image, rather than record every pixel value individually, the pixel sequence can be summarized more compactly.
PNG (Portable Network Graphics)
The PNG file format can be used for the display and distribution of RGB color files on-line and is also available as a file format option in Save for Web. PNG (pronounced ‘ping’) features improved image compression and allows the saving of alpha mask channels (for