Graphic File Formats (2006)
QuickStudy: Graphic File Formats
Definition: Graphic images are stored digitally using a small number of standardized graphic file
formats, including bit map, TIFF, JPEG, GIF, PNG; they can also be stored as raw, unprocessed data.
January 15, 2007 There are likely billions of graphic images
available on the World Wide Web, and with few exceptions, almost any user can
view any of them with no difficulty. This is because all those images are stored
in what amounts to a handful of file formats. Before discussing the principal
graphics file formats, however, we need to review the two fundamental types of
graphics: raster and vector.
A raster image is like a photo in your
newspaper. Look closely and you’ll see it’s made up of equally spaced round dots
in several distinct colors. But if you look at an ad featuring a line drawing
or, better yet, a banner headline, you won’t see an interrupted line of dots but
a solid image bounded by smooth curves. Those are vector graphics. Many graphics
are created as vector graphics and then published as raster images.
Most graphics that we see on-screen, and many that are printed on paper, are
actually structured as rectangular grids of pixels or colored dots. A full-color
image requires more color information than a black-and-white image. Some types
of graphics use geometric functions that allow them to be scaled up or down in
size.
One final distinction should be made between how an image is
stored (its graphic file format) and how it is generated for viewing by the end
user.
Most devices that output images, whether they be monitors, TVs or
ink-jet printers, actually produce raster output. They create successive
minuscule lines, each consisting of a line of dots of different colors (and
perhaps sizes) that end up on the final page as both images and letters. Before
the advent of modern high-resolution displays, there were CRT devices that
actually produced true vector output, but those are mainly history now. So we
need to provide our monitors or printers with sequences of all those colored
dots. A graphic that is already rasterized will save time and electrons because
it doesn’t need further processing by the computer.
BMP
The simplest way to define a raster graphic image is by using color-coded
information for each pixel on each row. This is the basic bit-map format used by
Microsoft Windows. The disadvantage of this type of image is that it can waste
large amounts of storage. Where there’s an area with a solid color, for example,
we don’t need to repeat that color information for every new contiguous pixel.
Instead, we can instruct the computer to repeat the current color until we
change it. This type of space-saving trick is the basis of compression, which
allows us to store the graphic using fewer bytes. Most Web graphics today are
compressed so that they can be transmitted more quickly. Some compression
techniques will save space yet preserve all the information that’s in the image.
That’s called “lossless” compression. Other types of compression can save a lot
more space, but the price you pay is degraded image quality. This is known as
“lossy” compression.
TIFF
Most graphics file formats were
created with a particular use in mind, although most can be used for a wide
variety of image types. Another common bit-mapped image type is Tagged Image
File Format, which is used in faxing, desktop publishing and medical imaging.
TIFF is actually a “container” that can hold bit maps and JPEGs and allows (but
doesn’t require) various types of compression.
JPEG
The Joint Photographic Experts Group created the JPEG standard
in 1990 for the efficient compression of photographic images. JPEG allows
varying levels of lossy compression, letting you trade off quality against file
size. Progressive JPEG is a way to rearrange the graphic data to permit a rough
view of the entire image even when only a small portion of the file has been
downloaded. The JPEG standard includes 29 distinct coding processes, but not all
of them need to be used. If an image has flat areas of single color that
transition sharply to contiguous areas, JPEG doesn’t work as well as GIF.
JPEG 2000 is a wavelet-based standard designed to supersede the original. It
offers improved compression, including lossless compression, and supports
multiple resolutions in a single file, but it has only limited support in
current Web browsers.
GIF
The Graphic Interchange Format takes an image and re-creates it using a palette of
no more than 256 colors. These palettes can be totally different for different images.
GIF is a very efficient format that achieves very good compression for nonphotographic
images. GIF also permits the creation of animated images by allowing a file to contain
several different frames (each with its own palette) and to switch between them
with a specified delay. In addition, GIF images are one of the few types that
can have a transparent background, meaning that there’s no need to always
display a rectangular area.
>GIF was once quite popular, but in 1995, it
became the centerpiece of a patent dispute that clouded the issue of who could
use what. The patent in question was for the LZW lossless compression algorithm;
it expired in 2003.
PNG
Portable Network Graphics is a standard developed in 1996 as an alternative to and
improvement on GIF, but without the patent issues and palette restrictions. PNG can
compress an image more than GIF and supports improved background transparency/opacity
but allows only single images, without animation.
Raw Data
As digital photography becomes ubiquitous and multimegapixel digital cameras grow more
common, you may hear more about raw images. Most inexpensive, consumer-grade
digicams store images as JPEG files (technically in EXIF format, a form of JPEG)
that involve the loss of some detail. This was done initially to keep file sizes
small, when flash memory storage was much more expensive than it is now.
Some higher-end cameras now offer the ability to save all image
information as raw, unprocessed data in a nonstandardized format that takes more
storage space but prevents the loss of subtle detail.
Raw images can be edited with professional-grade software and converted to JPEGs
for printing or other forms of distribution.
|
Common Graphics File Formats Compared |
| Type |
File Extension |
Compression Methods |
Principal application/usage |
Patented? |
Originated by |
| Graphics Interchange Format |
.gif |
Lempel-Ziv-Welch (LZW) algorithm |
Flat-color graphics, animation |
Expired |
Compuserve |
| Joint Photographic Experts Group |
.jpg |
Loses some data |
Photographic images |
Disputed |
Joint Photographic Experts Group |
| Portable Network Graphics |
.png |
Lossless |
Replacement for GIF |
No |
World Wide Web Consortium |
| Raw negative |
Various |
None |
High-end digital cameras |
No |
Individual equipment makers |
| Tagged Image File Format |
.tif |
Various or none |
Document imaging, scanning |
No |
Adobe Systems Inc. |
| Windows bit map |
.bmp |
None |
On-screen display |
No |
Microsoft Corp. |
Source: Adapted from "Comparison of graphics file formats," at Wikipedia.org
|
|