![](scanne1.gif)
Image File Formats which to use
The most common image file formats, the most important for general
purposes today, are TIF, JPG and GIF. I propose we also
consider the new PNG format also.
Best file types for these general
purposes are:
|
Photographic Images |
Graphics, including
Logos or Line art |
Properties |
Continuous tones, 24
bit color or 8 bit Gray, no text, few lines and edges |
Solid colors, up to
256 colors, with text or lines and sharp edges |
Best Quality for
Archived Master |
TIF or PNG
(no JPG artifacts) |
PNG or GIF or TIF
(no JPG artifacts) |
Smallest File Size |
JPG with a higher
Quality factor can be decent (JPG is questionable
quality for archiving master copies) |
TIF LZW or GIF or
PNG (graphics/logos usually permit reducing to 2
to 16 colors for smallest file size) |
Maximum
Compatibility
(PC, Mac, Unix) |
TIF or JPG
(the simplest programs may not read TIF LZW)
|
TIF without LZW
or GIF
|
Worst Choice |
256 color GIF is
very limited color, and is a larger file than 24 bit JPG |
JPG compression adds
artifacts, smears text and lines and edges |
.PNG file extension, the pronunciation 'Ping' is specifically
mentioned in the PNG Specification). PNG needs to be mentioned. PNG is
not the number one file format, but you will want to know about it. PNG
is not so popular yet, but it's appeal is growing as people discover
what it can do.
PNG was designed recently, with the experience advantage of knowing
all that went before. The original purpose of PNG was to be a
royalty-free GIF and LZW replacement . However PNG supports a large set
of technical features, including superior lossless compression from
LZ77. Compression in PNG is called the ZIP method, and is like the
'deflate" method in PKZIP (and is royalty free).
.TIF file extension, pronounced Tiff) TIFF is the format of choice
for archiving important images. TIFF is THE leading commercial and
professional image standard. TIFF is the most universal and most widely
supported format across all platforms, Mac, Windows, Unix. Data up to 48
bits is supported.
TIFF supports most color spaces, RGB, CMYK, YCbCr, etc. TIFF is a
flexible format with many options. The data contains tags to declare
what type of data follows. New types are easy to invent, and this
versatility can cause incompatibly, but about any program anywhere will
handle the standard TIFF types that we might encounter. TIFF can store
data with bytes in either PC or Mac order (Intel or Motorola CPU chips
differ in this way). This choice improves efficiency (speed), but all
major programs today can read TIFF either way, and TIFF files can be
exchanged without problem.
Several compression formats are used with TIF. TIF with G3
compression is the universal standard for fax and multi-page line art
documents.
JPG file extension, pronounced Jay Peg). This is the right format for
those photo images which must be very small files, for example, for web
sites or for email. The JPG file is wonderfully small, often compressed
by 90%, or to only 1/10 of the size of the original data, which is very
good when modems are involved. However, this fantastic compression
efficiency comes with a high price. JPG uses lossy compression (lossy
meaning "with losses"). Lossy means that some image quality is
lost when the JPG data is compressed and saved, and this quality can
never be recovered.
Most other file compression methods are lossless, which means
"fully recoverable". Lossless compression always returns the
original data, bit-for-bit identical without any question about
differences (losses). We are used to saving data to a file, and getting
it all back when we next open that file. Our Word and Excel documents,
our Quicken data, any data at all, we cannot imagine NOT getting back
exactly the original data. TIF, PNG, GIF, BMP and most other image file
formats are lossless too. This integrity requirement does limit
efficiency, limiting compression of photo image data to maybe only 10%
to 40% reduction in practice (graphics can be smaller). But most
compression methods have full lossless recoverability as the first
requirement.
JPG files don't work that way. JPG is an exception. JPG compression
is not lossless. JPG compression is lossy. Lossy means "with
losses" to image quality. JPG compression has very high efficiency
(relatively tiny files) because it is intentionally designed to be lossy,
designed to give very small files without the requirement for full
recoverability. JPG modifies the image pixel data (color values) to be
more convenient for its compression method. Detail that doesn't compress
well can be ignored (removed instead of retained). This allows amazing
size reductions on the remainder, but when we open the file and expand
the data to access it again, it is no longer the same data as before.
This lost data is like lost purity or integrity. It can vary in degree,
it can be fairly good, but it is always unrecoverable corruption of the
data. This makes JPG be quite different from all the other usual file
format choices.
GIF file extension) There have been raging debates about the
pronunciation. The designers of GIF say it is correctly pronounced to
sound like Jiff. But that seems counter-intuitive, and up in my hills,
we say it sounding like Gift (without the t).
GIF was developed by CompuServe to show images online (in 1987 for 8
bit video boards, before JPG and 24 bit color was in use). GIF uses indexed
color, which is limited to a palette of only 256 colors (next page).
GIF was a great match for the old 8 bit 256 color video boards, but is
inappropriate for today's 24 bit photo images.
GIF files do NOT store the image's scaled resolution ppi number, so
scaling is necessary every time one is printed. This is of no importance
for screen or web images. GIF file format was designed for CompuServe
screens, and screens don't use ppi for any purpose. Our printers didn't
print images in 1987, so it was useless information, and CompuServe
simply didn't bother to store the printing resolution in GIF files.
GIF is still an excellent format for graphics, and this is its
purpose today, especially on the web. Graphic images (like logos or
dialog boxes) use few colors. Being limited to 256 colors is not
important for a 3 color logo. A 16 color GIF is a very small file, much
smaller, and more clear than any JPG, and ideal for graphics on the web.
Graphics generally use solid colors instead of graduated shades,
which limits their color count drastically, which is ideal for GIF's
indexed color. GIF uses lossless LZW compression for relatively small
file size, as compared to uncompressed data. GIF files offer optimum
compression (smallest files) for solid color graphics, because objects
of one exact color compress very efficiently in LZW. The LZW compression
is lossless, but of course the conversion to only 256 colors may be a
great loss. JPG is much better for 24 bit photographic images on the
web. For those continuous tone images, the JPG file is also very much
smaller (although lossy). But for graphics, GIF files will be smaller,
and better quality, and (assuming no dithering) pure and clear without
JPG artifacts.
If GIF is used for continuous tone photo images, the limited color
can be poor, and the 256 color file is quite large as compared to JPG
compression, even though it is 8 bit data instead of 24 bits. Photos
might typically contain 100,000 different color values, so the image
quality of photos is normally rather poor when limited to 256 colors. 24
bit JPG is a much better choice today. The GIF format may not even be
offered as a save choice until you have reduced the image to 256 colors
or less.
NEXT