10.04.2018 Views

design3

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Imagery<br />

181<br />

amount of compression you apply. As you can see in Figure 5.29, a highly compressed image<br />

might be great for page load speed, but if you go as far as I did with the rightmost strawberry,<br />

it’s very unappetizing.<br />

Figure 5.29. An image of a strawberry saved at increasingly higher levels of JPEG compression<br />

GIF<br />

GIF (Graphics Interchange Format) is an 8-bit format that compresses files on the basis of the<br />

number of colors in the image. Although the compression ratio of the GIF format is good, it<br />

supports a maximum of only 256 colors, and is therefore useless for photographic pages. Two<br />

nifty features of GIF are that it displays transparency (see figure Figure 5.30), and supports animation.<br />

In the late 1990s, UNISYS (the company behind the compression algorithm used in<br />

GIF images) tried to claim that GIF was a proprietary format, and charged companies royalties<br />

for any program that created GIF files. This—as well as the 256-color limitation of the format—led<br />

to the creation of the PNG format. Although the GIF format is still widely used on the Web,<br />

using PNG instead is strongly encouraged.<br />

Figure 5.30. A transparent GIF and a 24-bit PNG, shown against different backgrounds<br />

PNG<br />

The PNG (Portable Networks Graphics) format was developed by the W3C as an alternative to<br />

GIF. The lossless compression style of the PNG algorithm works similarly to that of GIF, in that<br />

files with fewer colors end up having the smallest file sizes. PNG images can be saved in either

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!