Understanding Graphic File Formats

by Eric J. Ray


There once was a writer from San Jose
To whose graphics the printer said "nay"
They were huge and jagged,
if not blurry or ragged,
Will the writer be sent on his way?

Not necessarily. Identifying and fixing problems with graphics often comes down to a brief reminder of what the various kinds of graphic formats are and how to use each of them when they're the most appropriate--not merely most convenient--for the situation.


In general, technical writers deal with two basic classes of graphic file formats:

  • Bitmap graphics (also called raster graphics) are collections of dots (pixels) that fit together to make up an image. Some examples of bitmap file formats include:
    • PNG
    • TIFF
    • GIF
    • JPEG/JPG
    • BMP, MacPaint, and XBM

  • Vector graphics use lines--not dots--to describe
    images. Some example of popular vector graphic
    formats include:

    • AI
    • EPS
    • WMF


As you'll see in this article, each class has its purposes and uses, and within each class, each different type has specific strengths and weaknesses. Let's take a look....

Understanding and Choosing Bitmap Formats


Bitmap file formats are good choices for photographs and
screenshots, as well as images for online uses where portability and flexibility are key. In general, you'll choose a file format based on these considerations:
  • Color depth Bitmap file formats offer a range of color depth support, so choose a bitmap format that supports the depth of color you need. (That is, you don't need a format that supports millions of colors for a black and white line drawing.)
  • Compression Uncompressed bitmap files can easily be huge, so you will likely want to choose a format that supports compression. Compression can be lossless, in which all of the information in the original bitmap is retained, or lossy, in which some information (subtle color shifts, for example) is discarded to obtain a smaller file size.
  • Transparency Some graphic formats--notably PNG and GIF--support transparency, which allows you to replace the background color of an image and thereby get rid of distracting details and bring focus to the main part of the graphic.
  • Portability Portability refers to how easily you can open, modify, and view the files using different operating systems and software. Not all bitmap file formats are supported well on all platforms, so steer clear of proprietary formats if you'll be using the images on a variety of computer platforms. Similarly, not all bitmap formats work well on the Web.

Following are descriptions of some of the most common or popular bitmap graphic formats:

  • PNG (pronounced ping) graphics are a relatively new standard from the World Wide Web Consortium (w3.org, the people who bring you HTML and XML and many other standards). This format is recognized by the newer (most) Web browsers, provides good, lossless compression, supports transparency on the Web, and supports unlimited colors. PNG is a good choice for any Web images (if your readers will be using browsers that support this format), as well as a good choice for archiving bitmap images (because of its compression capabilities). PNG graphics are less common because the format is so new, but you can expect to see more and more of them as the format gains support and popularity.
  • TIFF graphics are an old standard with dozens (if not hundreds) of only marginally interchangeable sub-formats. TIFFs are as close to a standard file format for bitmap files as exists, but differences across platforms and software applications can wreak havoc on portability. If you're trying to maintain portability, be sure and test thoroughly and note all of the myriad options available before using this format. TIFF files are not Web-friendly, can be compressed in several ways (but need not be), support any color depth you choose, and are widely recognized.

    Note! As a result of some unfortunate licensing issues, a cloud hangs over the GIF file format. Urban legend aside, you need not pay a licensing fee for using GIF images created with most software because the software manufacturers have paid for the use of the licensed bits of code that they use.


  • GIF graphics are the oldest Web-friendly graphic format. GIFs are recognized by all graphical Web browsers, provide good compression, but support only up to 256 colors. GIF is a safe choice for any Web images but is better for drawings or illustrations. Photographs suffer in GIF format. Additionally, GIF support of rudimentary animation and transparency makes GIFs quite popular for special effects on the Web.
  • JPEG/JPG graphics are widely supported on the Web and a good choice for photographs. JPEG/JPG images support millions of colors and can be compressed to be quite small. However, the lossy compression makes JPG files a poor choice for archiving or any other applications in which you might later need the full image quality. If you need a JPG image (likely for the Web or for email), maintain an archival copy in a format like PNG or TIFF and save a copy as JPG when you need it.
  • BMP, MacPaint, and XBM are mostly proprietary or operating system-specific file formats. They offer few advantages and worlds of potential problems.

Understanding and Choosing Vector Formats


Vector graphics are good choices for any original
drawings or illustrations that you create on the computer because they scale more easily and smoothly than bitmaps do. For example, a vector graphic might specify a starting point, then to draw a line 10 units long, at a 45 degree angle, going up and to the right. In most illustration packages, you could double the size of the line, change the length, or even alter the angle at which it's drawn without significant effort and without compromising the graphic quality. On the other hand, if you have a line at a 45 degree angle in a bitmap and try to change the angle, you'll end up with a mess (try doing it by hand on graph paper or with kids' blocks, for an example).

Your main consideration in choosing a vector file format is portability among software applications and operating systems. Quality-wise, little differentiates one vector format from another:

  • AI (Adobe Illustrator) files are actually EPS files in disguise. If you use Illustrator (even on multiple platforms) this is a safe choice, but the portability to other software packages is iffy to poor.
  • EPS (Encapsulated Postscript) files are similar to, but somewhat more portable than, AI files. EPS files are great for Macintosh or UNIX, but often problematic on Wintel machines or on computers that do not have a PostScript printer installed (although workarounds do exist). The list of gotchas is fairly long, but EPS files are still the best bet for portable vector graphics.
  • WMF (Windows MetaFile) If you're using only Windows systems and have no need to maintain portability with other platforms, the WMF format is a good choice. They are simply not portable to other platforms, though, so do keep this in mind when choosing a vector format.

Final Thoughts


In general, you will be best served by storing and working with files in the native format of the program you are using (e.g., AI files for Adobe Illustrator, VSD files for Visio, PSD files for Paint Shop Pro, etc.) because those formats retain more information about your files and provide more flexibility than anything else--as long as you're using that program. (Most screen capture programs have no native format, so you'd save the files in whatever format you ultimately need.)


After you're ready to import the file into a word processing program, put the file on the Web, or mail the file to your boss, then you can save a copy to your choice of appropriate formats and use the copy as you choose.


...and be assured you won't be sent on your way.


Writing and Editing

Formats for MSWord 2003 to be PDF'ed

Hi, It may sound primitive, but I work mostly in MSWord (my clients don't have tech writers on staff and nobody knows FrameMaker. . .)

We sometimes print and sometimes just distribute PDF files of manuals on CD. Sometimes both.

I've been having some problems with line-drawing graphics that come from a technical illustrator. She is presumably working in Illustrator. I guess she should send me WMF files, right?

And photos - for the cover, for instance - should be TIFFs?
I've been using jpegs and they come out looking bad sometimes, even if high resolution, especially after the file is distilled.

I'm also having issues with the current printer -- usually the printer tells me what setting to use for making a PDF she'll be printing from, but the current printer can't tell me, and has been complaining about the quality of the doc.Any idea how I could find out what the distiller settings should be? I've tried "high quality print" preset selection & printer is still complaining.

Anybody have any ideas?

Thanks

Barbara - The engineer who writes.
Turning technology into English.
Specializing in mechanical technologies.