A few scanning tips

www.scantips.com

Google
Web   scantips.com

Image File Formats
Which to use?

Briefly, the three 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 too.

The file formats will generally and commonly store images in these color modes:

  Color data mode
Bits per pixel
TIFRGB - 24 or 48 bits,
Grayscale - 8 or 16 bits,
Indexed color - 1 to 8 bits,
Line Art (bilevel)- 1 bit
PNGRGB - 24 or 48 bits,
Grayscale - 8 or 16 bits,
Indexed color - 1 to 8 bits,
Line Art (bilevel) - 1 bit
JPGRGB - 24 bits,
Grayscale - 8 bits
GIFIndexed color - 1 to 8 bits

Best file types for these general purposes:

  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

These are not the only choices, but they are good and reasonable choices.

Web pages require JPG or GIF or PNG image types, because that is all that browsers can show. On the web, JPG is the best choice (smallest file) for photo images, and GIF is most common for graphic images.

Other than the web, TIF file format is the undisputed leader when best quality is required, and TIF is very common in commercial printing or professional environments. High Quality JPG can be pretty good too, but don't ruin them by making them too small. Try to make them large instead.

Difference in photo and graphics images

Photo images have continuous tones, meaning that adjacent pixels often have very similar colors, for example, a blue sky might have many shades of blue in it. Normally this is 24 bit RGB color, or 8 bit grayscale, and a typical color photo may contain perhaps 100,000 colors, out of the possible set of 16 million colors in 24 bit RGB color.

Graphic images are normally not continuous tone (gradients are possible in graphics, but are not seen very often). Graphics are drawings, not photos, and they use relatively few colors, perhaps less than 16 colors in the entire image. In a color graphic cartoon, the entire sky will be only one shade of blue where a photo might have dozens of shades. Or a map for example is graphics, maybe 4 or 5 map colors plus 2 or 3 colors of text, plus blue water and white paper, often less than 16 colors overall. These few colors are well suited for Indexed Color. Normally the edges in graphics do not use anti-alaising - which would add numerous shades. Line art is a special case, only two colors (black or white, no gray), for example clip art, fax, and of course text. However low resolution line art (like cartoons on the web) is often better as grayscale, to hide the jaggies.

JPG files are very small files for continuous tone photo images, but JPG is poor for graphics. JPG requires 24 bit color (graphics are normally not 24 bit color), and the JPG artifacts are most noticeable in the hard edges of graphics or text. GIF files (and other indexed color files) are good for graphics, but are poor for photos (too few colors possible). Formats like TIF and PNG can be either way, 24 bit or indexed color - these file types have different internal modes to accommodate either type optimally.

The three 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 too. These are not the only choices of course, but they are good and reasonable choices for general purposes.

The Next button will browse through the descriptions on the next pages, or you can use these shortcut links directly:

PNG Format TIF Format JPG Format GIF Format


Copyright © 1997-2008 by Wayne Fulton - All rights are reserved.

Previous Main Next