All About Digital Photos
 
What is a Digital Photo
Common Digital Photo File Formats

The digital format that an image is stored in is very critical to quality. There are dozens of digital image formats, but the three most common are JPEG a lossy format, TIF, a lossless format and RAW an in-camera lossless format. Lossy means that image data is lost when the image is compressed while a lossless format retains all the original data, even when compressed.

JPEG (JPG, JPE) stands for Joint Photographic Experts Group and is a standard developed in the 1980s to handle colour digital images. It works best with photographic images (as opposed images of text) because it relies on the blending of colour. It is a “lossy” format, it compresses the image by blending “redundant” image pixels. As the image is compressed blurriness appears around edges of objects in the photo.

Most cameras will show JPEG image quality settings of something like low (high compression), fine (moderate compression) and superfine (low compression). This is not to be confused with image size, they are two different things (cameras generally show image size as small, medium and large which relate to the pixel dimensions of the image). In photo editing computer programs JPEG compression is usually expressed as a percentage where 100% is no compression and 0% is maximum compression (think 100% quality vs. 0% quality). Usually visible distortion starts to appear at 50%. Adobe Photoshop uses a sliding scale from 0 to 12 (really 0% to 100%). Once compressed in JPEG format an image cannot be uncompressed (you cannot regain the original quality). This is why the original photo (your digital negative) should be taken with as little compression as possible.

image-example-100 image-example-75 image-example-50 image-example-10
Max Quality - 30 kb
0 compression
quality factor 100
(Adobe 12)
Good Quality - 9 kb
25% compression,
quality factor 75
(Adobe 6)
Moderate Quality - 6 kb
50% compression,
quality factor 50
Low Quality - 3 kb
90% compression,
quality factor 10

A problem with using a JPEG file as your editing original is that each time you do a "save as" with a JPEG after editing it further degrades, even if the JPEG compression is set to the highest quality. The degradation is not severe, but those who wish to maintain the best quality of their images will first "saved as" their image into a lossless format such as TIF and then do all their editing in that format. The final image can be saved back as a high quality JPEG. The next article will deal with image editing in more detail. Note that you can copy a JPEG file using your computer's copy function, multiple times with no loss of quality (like all digital files) - it is just the re-saving of a JPEG from any photo editing program after editing (or even cropping) that will add to the degradation of the image.

Pros: small image size, very good photographic reproduction, best format for emailing or posting to the web, compatible with virtually every image editor and viewer. Supports IPTC/XMP data (with certain software - see Labelling Photos).
Cons: "lossy" format, it compresses by removing information which can never be recovered, photo degradation after editing on save (even at highest quality setting).

A handy tool for determining the compression factor of a JPEG is a little freeware program called JpgQ. Have a look at the JPEG Quality Estimator (follow the link on that page to JpgQ - JPEG Quality Estimator).

JPEG2000 (JP2, JPF, JPX) this is a newer (introduced in 2000) version of JPEG which includes a lossless setting. It compresses through "wavelet" technology rather than block technology and at 0 compression it is a "lossless" format. It compresses 25-35% better than a standard JPEG with higher image quality. It will likely be some years before we see full scale implementation of this standard since it is much more complex than JPEG and hence more difficult to implement in photo software (so not all software fully supports it and/or properly implements it).

It (as JP2) is one of the recommended U.S. Library of Congress digital preservation standards (after TIF which is their primary recommendation).

Pros: small image size, very good photographic reproduction, has a lossless setting. Supports IPTC/XMP data (with certain software - see Labelling Photos).
Cons: not supported by all software, not properly implemented by some software, not web browser compatible.

TIF/TIFF – This is a lossless image format, that is, no pixels are modified in the image. TIFF stands for Tag Image File Format. This generally results in very large image sizes (in terms of computer file size). TIF has the option of being compressed, using a lossless compression technique known as LZW, which will shrink the image with no loss of data. Some programs will also allow compression within a TIF by ZIP (also lossless) or JPEG (lossy). Even compressed, TIF files are very large, much larger in computer file size than their JPEG equivalents. TIF is a favourite of graphic designers since it was an early standard on the mac, it is a lossless format and can contain more photo information than a JPEG image.

TIF is the main recommended format for digital preservation by the U.S. Library of Congress.

Pros: "lossless" format - all image information is retained. Supports IPTC/XMP data (with certain software - see Labelling Photos).
Cons: Huge file size even when compressed, has multiple "standards" so not all programs can read all TIF files. Not web browser compatible.

RAW – This is a lossless image format offered by some digital cameras. The JPEG image produced by a camera is an image processed by the camera’s software in which variables such as sharpness, contrast, saturation and white balance are applied to the digital image based on the camera’s settings. RAW on the other hand is the direct unprocessed image as seen by the camera’s sensor. It allows the post-image processing using any of the camera parameters (i.e. sharpness, contrast, etc.). This format is generally preferred by professional photographers for their image “negatives” (originals) since it allows the greatest post-processing flexibility. A downside of RAW is that the format is currently proprietary to the camera manufacturer and therefore it is not a good long term archival standard (you should convert your RAWs to TIFs for archival storage). There is work being done to standardize the RAW format, but a standard is unlikely to be set since new features (i.e. whitebalance, focus and HDR bracketing) being added into digital cameras end up being part of their RAW data and this keeps changing as new inovations are introduced.

Pros: "lossless" format - allows full post processing of all in-camera variables (white balance, saturation, sharpness, etc.).
Cons: Proprietary camera manufacturer format (multiple standards), not all software can view RAW files, large file size. Not web browser compatible.

Canon Screen
Example of a photo quality selection screen from a Canon digital camera. Resolution is set to best (largest pixel dimensions) and file compression is set to "superfine" (lowest JPEG compression)

Hopefully this article has provided you with a better sense of what a digital image actually is.

The general rule is to shoot your images with the highest setting that your camera will allow (largest image size in terms of pixels, lowest compression – usually large/superfine). Purists will use RAW if available, but for most people, using the large/superfine (or equivalent) JPEG setting in their digital camera is just fine.


Digital Image Filesize

From the discussion on the What is A Digital Photo page we know that the "size" of a digital image is its total number of pixels, expressed as megapixels. This is different than the filesize which is the amount of bytes used to store the image.

Even with the same digital size of an image (i.e. 3 Mp) the filesize is going to vary depending on the filetype used to store the image, the amount of colour in the image and the colour mode that is being used. As an example of this variation within the same digital image size, the filesize range of JPEGs shot with my current camera (stored at about 96% / Adobe 11 quality), at 18 Mp, varies from 4 Mb to 11 Mb - the variation a result of colour and brightness in each photo. The exception is with an uncompressed TIF which will always have the same file size for a digital photo of a certain Mp resolution and colour mode.

The chart below shows examples of a 3 Mp image and an 15 Mp image (similar scenes) stored using different file formats.

Filetype 3 Mp Image 15 Mp Image
JPEG - 100%/Adobe 12 - 24 bit RGB 2.6 Mb 10.2 Mb
JPEG - 94%/Adobe 10 - 24 bit RGB 1.2 Mb 4.5 Mb
JPEG - 75%/Adobe 6 - 24 bit RGB 0.5 Mb 1.8 Mb
TIF - uncompressed - 24 bit RGB 9.2 Mb 44.1 Mb
TIF - LZW compressed - 24 bit RGB 6.4 Mb 25.8 Mb
CRW/CR2 -Canon RAW - 24 bit RGB 2.3 Mb 22.4 Mb
JPEG2000 - uncompressed - 24 bit RGB 4.0 Mb 17.9 Mb
JPEG - 94%/Adobe10 - 48 bit RGB 1.2 Mb 4.5 Mb
TIF - LZW compressed - 48 bit RGB 12.7 Mb 53.0 Mb
TIF - LZW compressed - 96 bit RGB 29.8 Mb 124.9 Mb


If those same photos were resampled down to 800 x 600 and saved at 50% JPEG they would be about 100 kb (0.1 Mb) in size (ideal for emailing). See the Changing Photo Size page.



Home   •   What Is | Filetypes | Colour Models | Acronymns and Nomenclature | Frequently Asked Questions (FAQ)   •   Storage   •   Digital Labelling | Visible Captioning   •   Myth DPI | Change DPI | Print Shops | Arithmetic of DPI | FAQ | Photoshop Dialog Box   •   Home Printing | Print Shops   •   Geotagging   •   Scanning   •   Digital Images and Genealogy | Make Your Photos Last Forever | Camera or Scanner | Copying Old Photos | Workflow Examples | Visible Captioning | Choosing a Camera | Print Longevity | Sending Photos to Relatives


Have you found this website useful? It is a non-commercial site run (and paid for) by Ken Watson. You can help with its continued development by making a donation using PayPal (they accept any credit card) - just click on the button


Comments - send me email: Ken Watson

URL: www.rideau-info.com/photos/filetypes.html
© 2003-2013 Ken W. Watson