11.11.2014 Views

Professional Web Design: Techniques and Templates, Fourth Edition

Professional Web Design: Techniques and Templates, Fourth Edition

Professional Web Design: Techniques and Templates, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Learning about JPGs, PNGs, <strong>and</strong> GIFs 137<br />

Unfortunately, if the image is already created, there is not much the designer<br />

can do. When starting a design from scratch, however, this can be helpful to<br />

know if the download size of the site is extremely critical. Figure 7.17 is a design<br />

that was created especially to benefit from GIF compression. Notice that nearly<br />

all the lines run horizontally. Not only does this take advantage of the GIF<br />

format’s best compression, but it also takes advantage of using the ability to<br />

repeat background images. In other words, each line that cannot be saved just as<br />

a background color can be saved as a background image, which can be repeated<br />

infinitely across the X axis (horizontal) using CSS. That way, the design requires<br />

a download of only a few images. It is then up to the browser to repeat the<br />

images, rather than making it necessary to download larger images.<br />

Using JPGs<br />

While the GIF format is useful for saving images with limited colors, the JPG<br />

format is just as powerful when saving images with hundreds, thous<strong>and</strong>s, or<br />

millions of colors. Unlike multiple benefits from the 8-bit PNG <strong>and</strong> GIF formats,<br />

this one advantage of the JPG format makes it remarkably valuable when building<br />

mortised sites.<br />

A designer should typically save an image as a JPG in the following situations.<br />

Figure 7.17<br />

<strong>Design</strong> that takes advantage of GIF horizontal compression.<br />

Game Developing GWX

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

Saved successfully!

Ooh no, something went wrong!