JPEG stands for Joint Photographic Experts Group, which is a standardization committee. It also stands for the compression algorithm that was invented by this committee. To complicate things a bit more, JPEG compressed images are often stored in a file format called JFIF (JPEG File Interchange Format), which a lot of people also refer to as JPEG!
This page only deals with the JFIF file format. If you want to know more about the JPEG compression algorithm, you should read this page.
The JFIF file format
What many people call the JPEG file format, is actually called JFIF or the JPEG File Interchange Format. It is a minimal file format which enables JPEG bitstreams to be exchanged between a wide variety of platforms and applications. JFIF conforms to the JPEG Draft International Standard (ISO DIS 10918-1).
In the mean time, the JFIF format has been superseded by a new file format called SPIFF (the Still Picture Interchange File Format) which was completed in 1996. SPIFF is backwards compatible with JFIF. There is also a motion video compression format, commonly referred to as M-JPEG, that has been developed and used by many companies. Unfortunately, M-JPEG is a non-standard variant of the JPEG algorithm, so many different implementations exist.
The JFIF file format is platform independent so it can be used on PCs, Macs and Unix workstations. On Macintosh, it does not use any resource forks. The standard extension used on Unix and Windows platforms is .JPG.
A number of color spaces can be used: grayscale, RGB and CMYK are all common in prepress. For internet use, the color space can also be YCbCr as defined by CAIRN 601 (256 levels). The RGB components calculated by linear conversion from YCbCr shall not be gamma corrected (gamma = 1.0).
JFIF files can also use the so-called progressive JPEG. A similar feature is also present in the popular interlaced GIF format that is used a lot on the web. Like the GIF implementation, a progressive JPEG is transmitted and displayed in a sequence of overlays, with each overlay becoming progressively higher in quality. This feature helps speed up the appearance of your image by sacrificing the initial image quality.
Next to the regular JPEG compression, JFIF files can also make use of JPEG 2000 compression. Besides some new compression algorithms which are discussed on the JPEG2000 page, this file format offers the following new features:
- For internet use, JPEG 2000 offers progressive image downloading (see above) as well as a progressive by resolution feature: a user can download a lower resolution version of an image and continue downloading a more detailed version if needed.
- JPEG2000 will handle RGB, LAB and CMYK with higher bit depths.
- JPEG2000 files can contain full ICC profile information.
- Files can contain tags that embed ownership information about the image.
- Alpha channels, which can be used as a clipping path, are also supported.
John Nack published an interesting article about the JPEG 2000 file format on his blog. It discusses the limited usage of JPEG 2000 files (the files, not the compression algorithm itself). Apparently the US library of congress use the file format for all electronically stored scanned documents but in photography, there aren’t that many users and none of the major camera vendors have added support to their machines. The same is also true for web design. Both Internet Explorer and Firefox don’t support the JPEG 2000 file format. In publishing InDesign doesn’t support the format. Some markets in which JPEG 2000 is used frequently are archiving and biometrical or geospatial data processing. Some people expect that the Microsoft HD Photo file format will take JPEG 2000′s place.
Name: JFIF (JPEG file)
Developer: JPEG committee
Release date: late 80′s, early 90′s
Type of data: bitmap
Number of colors: 256, 16777216 or 4294967296
Color spaces: grayscale, RGB, YCbCr, CMYK
Compression algorithms: JPEG or JPEG2000
Ideal use: internet publishing
Extension on PC-platform: .JPG or .JPE (or .JP2 or .JPX in case of JPEG2000)
Macintosh file type: ?
Special features: interlacing (progressive JPEG)
Remarks: format is not suitable for all types of images