HTML and CSS Reference
In-Depth Information
Fortunately, some recently provided tools help create separate regions to be changed and
generate the code needed to make the changes (see the section, “Application for Dynamic
SVG i les from Adobe Illustrator CS5 i les” later in this chapter.)
Graphic Information Format (GIF)
h e good thing about GIF i les is that they can produce some of the smallest i les and they
support background transparency. In large part, that's because they can handle only 256 colors
and obtain transparency by turning of one of the colors. h e set of colors known as “Web safe”
are based on the fact that GIF i les can handle only 256 colors. h is format is extremely
limiting for designers who want a larger color palette, and the format is not recommended for
digital photographs other than black-and-white ones with limited gray tones.
One format for GIF i les is an animated one. If an animated GIF is loaded, it begins playing —
sequentially l ipping through the images — displaying animated actions. Because the ani-
mated GIF is contained in a single i le, it can be loaded directly into an HTML5 page using
the <img> tag. Typical animated GIF i les are relatively short. Otherwise, the pack of i les
within the animated GIF i le is too large for quick loading.
Besides the limited number of colors available for GIF creations, CompuServe and Unisys
held a copyright on the format and set up a licensing requirement. Rather than worry about
getting sued, most developers simply opted for other graphic formats.
Joint Photographic Experts Group (JPEG)
Most digital photographs on the Web use the JPEG format. Likewise, any more complex
graphics with several colors and shades prefer JPEG for preserving the look intended by the
photographer or artist. As a result, most of the images on Web sites that display services or
products are in the JPEG format. JPEG i les tend to be larger than GIFs, but with the
increased bandwidth on the Internet, the size is not as problematic as it once was.
h e JPEG format doesn't support transparency like GIF i les, and it doesn't have an animated
format. Further, JPEG i les use what is called lossy compression, which can reduce the image
i delity. Compared to lossless compression that supports an exact replication of the original
data, lossy compression is considered more of an approximation of the original data that
makes up the image.
h e standard JPEG format is open source and requires no licensing permission. Interestingly,
some patented features for JPEG can require licensing, but these features have not been
included in most JPEG i les so developers and designers can use JPEG format freely.
Portable Network Graphics (PNG)
In part, the PNG format was developed as an alternative to the patent license requirements in
the GIF format. However, the development was also motivated by the desire to have more
than 256 colors and a lossless display. h e PNG format also supports transparency and an
alpha channel.
Search WWH ::

Custom Search