A few scanning tips

www.scantips.com

Google
Web   scantips.com

Image File Formats - TIF, JPG, PNG, GIF
Which to use?

The three most common image file formats, the most important for printing, scanning and internet use, are TIF, JPG and GIF. However, TIF cannot be used in internet browsers.

All editor programs like Adobe Photoshop or Adobe Elements support these file formats, which will generally support and store images in the following 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

For TIF files, most programs allow either no compression or LZW compression (lossless, but is less effective for 24 bit color images). Adobe Photoshop also provides JPG or ZIP compression too (but which greatly reduces third party compatibility of TIF files). "Document programs" allow ITCC G3 or G4 compression for 1 bit text (Fax is G3 or G4 TIF files), which is lossless and tremendously effective (small).

PNGRGB - 24 or 48 bits,
Grayscale - 8 or 16 bits,
Indexed color - 1 to 8 bits,
Line Art (bilevel) - 1 bit

PNG uses ZIP compression which is lossless, and slightly more effective than LZW (slightly smaller files). PNG is a newer format, designed to be both verstile and royalty free, back when the LZW patent was disputed.

JPGRGB - 24 bits,
Grayscale - 8 bits

JPEG always uses lossy JPG compression, but its degree is selectable, for higher quality and larger files, or lower quality and smaller files.

GIFIndexed color - 1 to 8 bits

GIF uses lossless LZW compression, effective on indexed color. GIF files contain no dpi information for printing purposes.

Note that if your image size is say 3000x2000 pixels, then this is 3000x2000 = 6 million pixels (6 megapixels). If this 6 megapixel image data is RGB color (if 24 bits, or 3 bytes per pixel of RGB color information), then the size of this image data is 6 million x 3 bytes RGB = 18 million bytes. That is simply how large your image data is (see more). Then file compression like JPG or LZW can make the file smaller, but when you open the image in computer memory for use, the JPG may not still have the same image quality, but it is always still 3000x2000 pixels and 18 million bytes. This is simply how large your RGB image data is (megapixels x 3 bytes per pixel).

Best file types for these general purposes:

  Photographic Images Graphics, including
Logos or Line art 
Properties Photos are continuous tones, 24 bit color or 8 bit Gray, no text, few lines and edges Graphics are often solid colors, up to 256 colors, with text or lines and sharp edges
For Unquestionable Best Quality TIF or PNG (lossless compression
and no JPG artifacts)
PNG or TIF (lossless compression,
and no JPG artifacts)
Smallest File Size JPG with a higher Quality factor can be decent. TIF LZW or GIF or PNG   (graphics/logos without gradients normally permit indexed color of 2 to 16 colors for smallest file size)
Maximum Compatibility
(PC, Mac, Unix)
TIF or JPG TIF 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, with quality being less important than size) for photo images, and GIF is common for graphic images. GIF was designed for modems by CompuServe, for earliest 8 bit video, and so GIF contains no printing dpi information, and is out of date for 24 bit photos now, but GIF still works quite well for video graphics on the internet.

Other than the web, TIF file format is the undisputed leader when best quality is required (when less than maximum quality is not a consideration). So TIF is very common in commercial or professional printing environments. High Quality JPG can be pretty good too, but don't ruin them by making them too small. If the goal is high quality, then only consider making JPG large instead, and plan your work so you can only save them one or two times. Adobe RGB color space may be OK for your home printer and profiles, but if you send your pictures out to be printed, the mass market printing labs normally only accept JPG files and only process sRGB color space.

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 (graphics use high resolution to smooth jaggies instead). Scanners have three modes to create the image: color (for all color work), grayscale (like B&W photos), and lineart. Line art is a special case, only two colors (black or white, with 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 add aliasing 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 or 8 bit grayscale, 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). However, graphics are normally not 24 bit color anyway. Formats like TIF and PNG can be used either way, 24 bit or indexed color - these file types have different internal modes to accommodate either type optimally.

Note again that if you are scanning text based documents (black text on white paper, two colors) in the optimum line art mode for this, but then save them as JPG, they necessarily will become 8 bit grayscale images, and those JPG files will be much larger than if you had known to select TIF with LZW compression. The opposite is of course true (about file size) if scanning 24 bit color photos.

The three most common image file formats, the most important for general purposes today, are TIF, JPG and GIF. PNG format is excellent too. These are not the only choices of course, but they are good and reasonable choices for general purposes. Newer formats like JPG2000 in Adobe programs never acquired popular usage, and are not supported by web browsers, and so are not the most compatible choice.

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