The magazine of the Melbourne PC User Group
Demystifying Graphic File Formats
Ben Luna
akosiben@netscape.net |
|
The purpose of this article is to briefly describe some of the
most common graphic file formats for image files, as well as how to determine which file format to
use for Web graphics and print publications. When an image is saved to a specific file format, you
are telling your applications how to write the image's information to disk. The specific file
format you choose depends on the graphics software application you are using (e.g., Adobe
Illustrator, Freehand, Adobe Photoshop) and how and where you will use your image (e.g., the Web or
a print publication.)
Graphic file formats can be broadly categorized into bit-mapped formats and vector formats.
Bit-mapped Formats
This format is a representation, consisting of rows and columns of dots, of a graphics image in
computer memory. This is sometimes called raster graphics. The value of each dot, whether it is
filled or not, is stored in one or more bits of data. The density of the dots, known as the
resolution, determines how sharply the image is represented. This is often expressed in dots per
inch (dpi), or simply by the number of rows and columns, such as 640 by 480. To display a
bit-mapped image on a monitor or to print in a printer, the computer translates the bit map into
pixels for monitor screens, or ink dots for printer. Programs that manipulate bit-mapped images are
often called paint programs.
Following are descriptions of some commonly used bit-mapped file formats:
BMP: The Bitmap file format is used for bitmap graphics on the Windows platform only.
Unlike other file formats, which store image data from top to bottom and pixels in red/green/blue
order, the BMP format stores image data from bottom to top and pixels in blue/green/red order. This
means that if memory is tight, BMP graphics will sometimes appear drawn from bottom to top.
Compression of BMP files is not supported, so they are usually very large. When saving a file to
the BMP format, add the ".bmp " file extension to the end of its file name.
GIF: The Graphics Interchange Format was originally developed by CompuServe in 1987.
It is one of the most popular file formats for Web graphics and for exchanging graphics files
between computers. It is most commonly used for bitmap images composed of line drawings or blocks
of a few distinct colours. The GIF format supports 8 bits of colour information or less. In
addition, the GIF89 file format supports transparency, allowing you to make a colour in your image
transparent. (Please note: CompuServe GIF87 does not support transparency.) This feature makes GIF
a particularly popular format for Web images.
GIF, is a "lossy" file format. It reduces an image's file size by removing bits of colour
information during the conversion process. The GIF format supports 256 colours or less. When
creating images for the Web, be aware that only 216 colours are shared between Macintosh and
Windows monitors. These colours, called the "Web palette," should be used when creating GIFs for
the Web because colours that are not in this palette display differently on Macintosh and Windows
monitors. When saving an image to the GIF format, add the ".gif" file extension to the end of its
file name.
PCX: Originally developed by ZSOFT for its PC Paintbrush program, PCX is a common
graphics file format supported by many graphics programs, as well as most optical scanners and fax
modems. When saving an image to the PCX format, add the ".pcx" file extension to the end of its
file name.
TIFF: Tagged Image File Format is a standard file format for storing images as
bitmaps. It is used especially for scanned images because it can support any size, resolution, and
colour depth. When saving an image to the TIFF format, add the ".tif" file extension to the end of
its file name.
Vector Graphics
The other method for representing images is known as vector graphics (or object-oriented graphics.)
With vector graphics, images are represented as mathematical formulas that define all the shapes in
the image. Vector graphics are more flexible than bit-mapped graphics because they look the same
even when they are scaled to different sizes. In contrast, bit-mapped graphics become ragged when
they are shrunk or enlarged. Programs that enable the user to create and manipulate vector graphics
are called draw programs. Images stored as vectors look better on monitors and printers with higher
resolution (bit-mapped images always appear the same regardless of a device's resolution.) Another
advantage is that images in vector graphics often require less memory that bit-mapped images.
Almost all sophisticated graphics systems, including CAD systems and animation software, use vector
graphics.
Following are descriptions of some commonly used vector graphics file formats:
EPS: The Encapsulated PostScript file format is a metafile format; it can be used for
vector images or bitmap images. The EPS file format can be used on a variety of platforms,
including Macintosh and Windows. When you place an EPS image into a document, you can scale it up
or down without information loss. This format contains PostScript information and should be used
when printing to a PostScript output device. The PostScript language, which was developed by Adobe,
is the industry standard for desktop publishing software and hardware. EPS files can be graphics or
images of whole pages that include text, font, graphics, and page layout information.
JPEG: Like GIF, the Joint Photographic Experts Group format is one of the most
popular formats for Web graphics. It supports 24 bits of colour information, and is most commonly
used for photographs and similar continuous-tone bitmap images. The JPEG file format stores all of
the colour information in an RGB image, then reduces the file size by compressing it, or saving
only the colour information that is essential to the image. Most imaging applications and plug-ins
let you determine the amount of compression used when saving a graphic in the JPEG format. Unlike
GIF, JPEG does not support transparency.
Use JPEG for scanned photographs and naturalistic artwork with highlights, shaded areas, and
shadows. The more complex and subtly rendered the image is, the more likely it is that the image
should be converted to JPEG.
JPEG, like GIF, uses a "lossy" compression technique, which changes the original image by removing
colour information during the conversion process. The JPEG file format supports millions of
colours. In theory, JPEG was designed so that changes made to the original image during conversion
to JPEG would not be visible to the human eye. Most imaging applications let the user control the
amount of lossy compression performed on an image, so you can trade off image quality for smaller
file size and vice versa. Be aware that the chances of image degradation when converting to JPEG
increase proportionally with the amount of compression you use. When saving a file in the JPEG
format, add the "*.jpg" file extension to the end of its file name.
Use the JPEG file format for images with only a few distinct colours, such as illustrations,
cartoons, and images with blocks of colour, such as icons, buttons, and horizontal rules.
PICT: The Picture file format is for use primarily on the Macintosh platform; it is
the default format for Macintosh image files. The PICT format is most commonly used for bitmap
images, but can be used for vector images as well. Avoid using PICT images for print publishing.
The PICT format is "lossless," meaning it does not remove information from the original image
during the file format conversion process. Because the PICT format supports only limited
compression on Macintosh computers with QuickTime installed, PICT files are usually large. When
saving an image as a PICT, add the file extension ".pct" to the end of its file name. Use the PICT
format for images used in video editing, animation, desktop computer presentations, and multimedia
authoring.
PNG: The Portable Network Graphics format will likely be the successor to the GIF
file format. PNG is not yet widely supported by most Web browsers. Netscape versions 4.04 and
later, and Internet Explorer version 4.01 and later, currently support this file format. However,
PNG is expected to become a mainstream format for Web images and could replace GIF entirely. It is
platform independent and should be used for single images only (not animation). Compared with GIF,
PNG offers greater colour support and better compression, gamma correction for brightness control
across platforms, better support for transparency, and a better method for displaying progressive
images. When saving an image to the PNG format, add the file extension ".png" to the end of its
file name.
CGM: The Computer Graphics Metafile is a format developed by several standards
organizations. CGM is supported by many PC Software products. When saving an image to the CGM
format, add the file extension ".cgm" to the end of its file name.
DXF: The Data Exchange File is a format developed by Autodesk. Almost all PC-based
CAD systems support DXF.
GEM: The graphics file format used by GEM-based applications. GEM is a graphical user
interface (GUI) developed by Digital Research.
HPGL: Hewlett-Packard Graphics Language is one of the oldest file formats. Although
it is not very sophisticated, it is supported by many PC-based graphics products.
IGES: Initial Graphics Exchange Specification is an ANSI Standard for
three-dimensional wire frame models. IGES is supported by most PC-based CAD systems.
PIC: This is a relatively simple file format developed by Lotus for representing
graphs generated by Lotus 1-2-3. PIC is supported by a wide variety of PC applications.
WMF: The Windows file format is used for exchanging graphics between Microsoft
Windows applications. WMF files can also hold bit-mapped images.
The debate over which format is better still surfaces once in a while. My opinion is that each
format has its place, just as the native format of the various paint-and-draw programs. One format
may be better than others in terms of quality; at other times, another format may be better in
terms of size. Best way is to take the time to view and store your images in different formats and
select the one optimum for your needs, storage capability, and ease of use.
About the Author:
Ben Luna's experience includes writing manuals for computers and software. E-mail him: akosiben@netscape.net
Reprinted from the May 2001 issue of PC Update,
the magazine of Melbourne PC User Group, Australia
|