LocalArchiver.com - Print Friendly Version
Guides to Photo and Document Preservation and Sharing for Families and Community Historical Societies


Digital File Formats and Recommendations

By R. Anderson - 2/2009

There are many file formats that can be used to store digital image information.  This article is intended to introduce the reader to some of the most important considerations in selecting file formats.


Cameras, scanners, and image editing software often offer us a choice of digital image file formats in which to save and store our captured image information. It is recommended that Jpeg and Gif file formats be your typical choices for preservation and sharing needs.  The choice between Jpeg and Gif will depend on the nature of the image to be stored.

 

Major Considerations in Selecting a Digital File Format

To make sound decisions about file format choices, it is useful to understand two major variables associated with file formats.

1.)  File formats vary in the amount of space used to store information about each pixel of image.  Formats which allocate less space limit the amount of subtle color and hue information that can be re-constructed in an image.  On the other hand, it takes less storage space to store less information.

2.)  With some file formats, information is compressed by an algorithm that eliminates information not considered necessary.  File formats that lose information in the compression process are called "lossy ", while those that do not lose information and/or do not compress information are called "lossless" formats.

To better understand these variables, we will briefly explain the  major differences between Jpeg and Gif, and how these differences impact when one should use one or the other.  Following the discussion of Jpeg and Gif, some of the other major formats will be described.

 

Digital File Bits and Bytes

Once image information is captured in pixels, the information must be formatted and saved as a digital file containing bits and bytes of data reflecting information about each image pixel. Recall that a bit is a single piece of digital information denoting a 1 or 0, and that 8 bits in some coded combination of 1s and 0s reflects a byte of information. Clearly, if a given digital file format uses more bytes of storage, it can store more information and more subtleties of information.

 


Jpeg File Format

Jpeg is the recommended file format for full color and complex gray-scale photo type realistic images.  The Jpeg format uses 24 bits (3 bytes) of storage to represent image information about each image pixel.  By using a byte of storage for each of the pixel's three RGB (Red, Blue, Green) colors, the format can distinguish a given pixel as a blend of 256 shades of red, 256 shades of green, and 256 shades of blue.  these combinations result in the Jpeg format being able to distinguish among millions of color variations.

This ability to record continuous and complex changes in colors and hues means that images represented by Jpeg files can be re-constructed to produce very realistic duplicates of original images.

Although the 24 bit format results in large initial files, the reliable and controllable compression capability of the format has made Jpeg the most popular image file format for photo type realistic images among non-professionals.  Note that an uncompressed Jpeg file will reflect roughly three times as many bytes or megabytes as the image has pixels or megapixels.  This is the case since three bytes of digital information are used to store information about each image pixel, one byte each for red, green, and blue for each pixel.

The ability to compress files to save storage space and the increased ease of transferring and sharing the compressed files, are the two main reasons for the format's broad acceptance.

Jpeg File Compression

When digital image information is saved in the Jpeg format, the information is "compressed" by an algorithm that is sophisticated in taking advantage of what is known to be discernable to the human eye.  In the process, the pixel information that is identified as unimportant and/or least important, is eliminated.  This "lossy" nature of the file format results in dramatically reduced bytes of file information to be stored.

The manageable size of compressed Jpeg files, and the format's reliability in compressing the information have led to the format's very wide acceptance.  There are very few family members, friends, and image service providers that can not work with Jpeg images you may send them.  As a primary objective of many projects is to more broadly share photo and document images, the relatively universal acceptance of the format is important and useful.

One of the big advantages of the Jpeg format is the user ability to specify the level of compression to be used with most cameras, image editing software, and some scanners.  The descriptions of compression levels vary, but generally indicate a top file quality designation such as "high", "superfine", or the highest number on a scale of 10 or 12.  These are indications of compressed image quality and imply a low level of compression.

Different images will compress in Jpeg to varying degrees regardless of your settings, since images vary in complexity and will be treated somewhat differently by the compression algorithm.

Tips / Hints:  A good habit to form is to save Jpeg files at the highest quality = lowest compression level available.  You will save considerable storage space and maintain maximum flexibility with your image into the future. 

Although professionals typically prefer lossless file formats, it is generally agreed that Jpeg compression of up to 10 times (files 1/10 of uncompressed size) does not normally result in noticeable loss of detail.  Depending upon the nature of the image, compression of up to 20 times may be acceptable.

Another good habit is to always make a copy of your high quality Jpeg files for specific uses, since each save of the original will result in cumulative pixel loss, regardless of the compression setting.

In discussions of digital files and images, the term "quality" and resolution may get confused.  "Quality" often refers to the level of compression used for a file format such as Jpeg, but may also refer to the quality of a scan or print.

For example, a common confusion for camera settings is the difference between pixel resolution setting (how many pixels are being captured) and the file "quality" compression setting (how many of these pixels are being retained in the file compression process).  Low compression equals a high "quality" file.


Gif File Format

Gif is the recommended format when working with images of limited colors and/or including sharp lines.  These images would include line drawings, images such as cartoons, text documents, heavily captioned images, some maps, etc.

The Gif format uses an 8 bit structure which is capable of recording up to 256 colors or gray-scale shades.  Therefore, uncompressed files are already one third the size of Jpeg (8 versus 24 bits), and the more limited color range better records sharp lines and fewer natural distinctions among a more limited number of colors.

Although, Gif is a lossless digital image file format (no pixel information is eliminated in the compression process), it is effective in consolidating stored information about areas of the same color.  Therefore, depending upon the nature and complexity of an image, Gif will often result in a much smaller file than Jpeg for the types of images recommended for Gif.

Gif is better at distinguishing between sharp lines and representing limited colors because it records information in an 8 bit format, which only provides the ability to distinguish between 256 colors or shades of gray-scale. On the other hand, the Jpeg format with its ability to record and reflect millions of colors, can actually become too subtle in its image representations and blur distinct lines and colors in these sorts of images.

Gif is also a file format which is commonly accepted and readily transferable.

 


Other Digital File Formats

Professional photographers will often opt for lossless file formats as they desire to have and retain a maximum level of detail in their images.  This increased and lossless detail can be important to them as they often spend considerable time adjusting, cropping, and otherwise manipulating their images.

However, by capturing and saving large image files, the professional is often working with files that exceed a size that would be readily sharable with a broad audience. 

Raw Format - The Raw format is a lossless digital format typically associated with digital camera image capture, and is often preferred by professional photographers.  The Raw format preserves the greatest amount of "raw" image information, which in turn provides professionals with the greatest future digital editing ability.  The format results in very large files, which offsets the value of expanded editing possibilities by anyone other than professional photographers.

TIFF Format - Tiff is a lossless digital file format associated with both cameras and scanners.  The Tiff format is also used by many professionals and some non-professionals.  Like the Raw format, the Tiff format results in large file size and an increased difficulty in sharing the files with others.

Image Editing Software Formats - Image editing software, such as Adobe Photoshop Elements, often default to a proprietary format.  In the case of Photoshop elements, the format is PSD (Photoshop Document).  This lossless format was designed to maximize flexibility with a broad range of editing capabilities available in this particular suite of image editing software. The format of files in Photoshop Elements, or other common image editing software packages, can easily be changed to your specific needs. If you use image editing software, it may be useful to keep files in the default file format until your editing is completed.  But to maximize your ability to share and archive your images, at some point you will want to create a library of Jpeg and Gif files by saving them in these formats.  This process is as simple as choosing Jpeg or Gif after you select "save as" in the file menu.