The file format
known as "JPEG Interchange Format" (JIF) is specified in Annex B of the
standard. However, this "pure" file format is rarely used, primarily
because of the difficulty of programming encoders and decoders that
fully implement all aspects of the standard and because of certain
shortcomings of the standard:
- Color space definition
- Component sub-sampling registration
- Pixel aspect ratio definition.
Several additional standards have evolved to address these issues. The first of these, released in 1992, was JPEG File Interchange Format (or JFIF), followed in recent years by Exchangeable image file format (Exif) and ICC color profiles. Both of these formats use the actual JIF byte layout, consisting of different
markers, but in addition employ one of the JIF standard's extension points, namely the
application markers:
JFIF use APP0, while Exif use APP1. Within these segments of the file,
that were left for future use in the JIF standard and aren't read by it,
these standards add specific metadata.
Thus, in some ways JFIF is a cutdown version of the JIF standard in
that it specifies certain constraints (such as not allowing all the
different encoding modes), while in other ways it is an extension of JIF
due to the added metadata. The documentation for the original JFIF
standard states:
- JPEG File Interchange Format is a minimal file format which
enables JPEG bitstreams to be exchanged between a wide variety of
platforms and applications. This minimal format does not include any of
the advanced features found in the TIFF JPEG specification or any
application specific file format. Nor should it, for the only purpose of
this simplified format is to allow the exchange of JPEG compressed
images.
Image files that employ JPEG compression are commonly called "JPEG
files", and are stored in variants of the JIF image format. Most image
capture devices (such as digital cameras) that output JPEG are actually
creating files in the Exif
format, the format that the camera industry has standardized on for
metadata interchange. On the other hand, since the Exif standard does
not allow color profiles, most image editing software stores JPEG in JFIF
format, and also include the APP1 segment from the Exif file to include
the metadata in an almost-compliant way; the JFIF standard is
interpreted somewhat flexibly.
Strictly speaking, the JFIF and Exif standards are incompatible
because they each specify that their marker segment (APP0 or APP1,
respectively) appears first. In practice, most JPEG files contain a JFIF
marker segment that precedes the Exif header. This allows older readers
to correctly handle the older format JFIF segment, while newer readers
also decode the following Exif segment, being less strict about
requiring it to appear first.