22.06.2015 Views

Step by Step HTML5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

142 Chapter 9<br />

Practice Files Before you can use the practice files provided for this chapter, you need<br />

to install them from the book’s companion content page to their default locations. See<br />

“Using the Practice Files” in the beginning of this book for more information.<br />

Selecting a Graphics Format<br />

There are dozens of graphics formats, but most Web browsers can display only a few. The<br />

most commonly accepted formats are GIF, JPG, and PNG, so most Web designers stick to<br />

those.<br />

Graphics formats differ from each other in the following ways:<br />

●●<br />

●●<br />

●●<br />

●●<br />

Color depth The higher the color depth (that is, the more bits used to uniquely<br />

describe the color of each pixel), the more realistic a photo will look. Color depth<br />

is not a major issue for drawings. Full color is 24-bit; if a graphic uses more bits per<br />

pixel than that, the extra bits are typically used to further define the color (not really<br />

necessary for Web use) and/or to set special image attributes, such as transparency.<br />

Compression/file size Graphics files tend to be large, so there are compression<br />

schemes that decrease their file size. Lossless compression makes a file smaller<br />

without losing any image quality; lossy compression shrinks a file at the expense of<br />

some quality. When the image is displayed on a computer monitor, however, the<br />

difference is minimal.<br />

Animation Some graphics formats support a very primitive kind of animation,<br />

in which several versions of a graphic are stored in a single file, and the Web page<br />

displaying the file cycles through the images. Simple animations displayed on a<br />

Web page are usually animated graphics rather than video clips.<br />

Transparency Some graphics formats can make the background of an image<br />

transparent. When you place the image in a document, the background color of<br />

the document shows through the transparent portions of the image. You can use<br />

this to create interesting effects. For example, when you place an image with a<br />

transparent background in a document containing text, the text wraps around the<br />

image. Delving into that technique is beyond the scope of this book, but you might<br />

want to experiment with transparency in Photoshop or some other graphics-editing<br />

program on your own.<br />

Tip To create your own animated graphics, use a graphics program that supports that feature,<br />

such as Photoshop or Paint Shop Pro.

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

Saved successfully!

Ooh no, something went wrong!