Graphics Programs Reference
In-Depth Information
All browsers can display graphics in the GIF and JPEG fi le formats. Recent versions of
Internet Explorer and Firefox can also display graphics in the PNG fi le format. The GIF,
JPEG, and PNG formats all compress graphic fi les but in different ways. If you want to
use graphic images that are in another format, you need to use a graphics processing
program such as Adobe Photoshop, Adobe Photoshop Lightroom, or Adobe Fireworks to
convert them to GIF, JPEG, or PNG.
Using GIF
GIF (Graphics Interchange Format) was invented by the CompuServe Company to
provide its customers with a means to exchange graphic fi les online. Unisys, which now
owns the patent on the type of compression used in GIFs, requires that software produc-
ing GIFs license the GIF patent. However, graphics compressed as GIFs can be used free
of charge. Files saved as GIF images have the fi le extension .gif. The GIF format is usually
used on images that have large areas of fl at, or nongradient, color. Nongradient refers
to color that is one shade and does not vary with subtle darkening or lightening. Many
line-drawn graphics and nonphotographic images use GIF. GIF supports a palette of up
to 256 colors, one of which can be used for single-color transparency. GIF transparency
is usually used to create a clear background for graphics. For example, if you want an
image to appear on a Web site without its background, you can make the background
transparent so that the color of the Web page or the background image behind it is vis-
ible. In GIF format, greater compression (and, therefore, smaller fi le size) is achieved
by further limiting the graphic's color palette. This means that the fewer colors used in a
GIF image, the smaller the fi le size. You need to fi nd a balance between how colorful an
image you want to use and how fast the target audience can load the image.
The new NextBest Fest logo that will appear in each page of the Web site is shown in
Figure 5-2. You could compress the new logo using GIF because it is composed of fl at
colors and has a transparent background. The transparent background enables the logo
to be laid over the background of the Web pages seamlessly. The logo fi le size is 7 K.
Figure 5-2
NextBest Fest logo as a GIF image
logo has rectangular,
transparent background
logo is 7 K
lo go uses flat colors,
like a line drawing
Using JPEG
A committee from the Joint Photographic Experts Group created the JPEG format to
digitize photographic images. Files saved as JPEG images have the fi le extension .jpg. The
JPEG format is usually used on photographic images and graphics that have many gradi-
ent colors. The JPEG format can support millions of colors but not transparency.
JPEG is a lossy compression format, which means that it discards (or loses) informa-
tion to compress an image. Because it was designed for photographic images, JPEG dis-
cards the information that is less perceptible to the human eye, such as the fi ne details in
the background of a photograph. As an image is further compressed, additional informa-
tion is discarded, the blurry spots increase in size and the image becomes less and less
sharp. So, as with a GIF image, you must make a trade-off between the image quality
and the fi le size (or download time).
Both the container div background image and the content div background image are
JPEG images because each contains a variety of gradient colors, which will be com-
pressed more effectively in this format. Figure 5-3 shows the two JPEG images.
Search WWH ::




Custom Search