Parent document is top of "JPEG image compression FAQ, part 1/2"
Previous document is "[13] Isn't there a lossless JPEG?"
Next document is "[15] How do I recognize which file format I have, and what do I do about it?"

[14] Why all the argument about file formats?

Strictly speaking, JPEG refers only to a family of compression algorithms;
it does *not* refer to a specific image file format.  The JPEG committee was
prevented from defining a file format by turf wars within the international
standards organizations.

Since we can't actually exchange images with anyone else unless we agree on
a common file format, this leaves us with a problem.  In the absence of
official standards, a number of JPEG program writers have just gone off to
"do their own thing", and as a result their programs aren't compatible with
anyone else's.

The closest thing we have to a standard JPEG format is some work that's been
coordinated by people at C-Cube Microsystems.  They have defined two
JPEG-based file formats:
  * JFIF (JPEG File Interchange Format), a "low-end" format that transports
    pixels and not much else.
  * TIFF/JPEG, aka TIFF 6.0, an extension of the Aldus TIFF format.  TIFF is
    a "high-end" format that will let you record just about everything you
    ever wanted to know about an image, and a lot more besides :-).

JFIF has emerged as the de-facto standard on Internet, and is what is most
commonly meant by "a JPEG file".  Most JFIF readers are also capable of
handling some not-quite-JFIF-legal variant formats.

The TIFF 6.0 spec for incorporating JPEG is not widely implemented, partly
because it has some serious design flaws.  A revised TIFF/JPEG design is now
described by TIFF Technical Note #2; this design will be the one used in
TIFF 7.0.  New implementations of TIFF should use the Tech Note's design for
embedding JPEG, not the TIFF 6.0 design.  (As far as I know, NeXTStep
systems are the only ones making any significant use of TIFF 6.0 style
TIFF/JPEG.)  Even when TIFF/JPEG is stable, it will never be as widely used
as JFIF.  TIFF is far more complex than JFIF, and is generally less
transportable because different vendors often implement slightly different,
nonoverlapping subsets of TIFF.  Adding JPEG to the mix hasn't helped any.

Apple's Macintosh QuickTime software uses a JFIF-compatible datastream
wrapped inside the Mac-specific PICT format.  Conversion between JFIF and
PICT/JPEG is pretty straightforward, and several Mac programs are available
to do it (see part 2, item 8).  If you have an editor that handles binary
files, you can even strip a PICT/JPEG file down to JFIF by hand; see the
next section for details.

News flash: the ISO JPEG committee seems to have won their turf wars.  They
have defined a complete file format spec called SPIFF in the new "Part 3"
extensions to the JPEG standard.  It's pretty late in the game though, so
whether this will have much impact on real-world files remains to be seen.
SPIFF is upward compatible with JFIF, so if it does get widely adopted, most
users probably won't even notice.

Parent document is top of "JPEG image compression FAQ, part 1/2"
Previous document is "[13] Isn't there a lossless JPEG?"
Next document is "[15] How do I recognize which file format I have, and what do I do about it?"