Dictionary

What Does JFIF Version Mean?

JFIF means JPEG File Interchange Format, the format of the files people usually call JPEG images. The JFIF version shows which version of this format a file follows.

jfif-version

JFIF stands for JPEG File Interchange Format, and JPEG stands for Joint Photographic Experts Group. JFIF is the file format that stores JPEG image data, so that different programs and computers can open it.

The JFIF version is a metadata field inside a JPEG file. It tells you which version of the JFIF specification the file follows, for example 1.01 or 1.02. You find the field in JPG files, because JFIF is a format for JPEG images only.

What JFIF adds to a JPEG image

The JPEG standard defines how the image data is compressed. A JFIF file is a normal JPEG file with one extra block of data, called the APP0 segment. This block comes directly after the marker that starts the image.

The data in the APP0 segment begins with the text JFIF. The segment stores information that the compressed image data does not contain:

  • The JFIF version
  • The horizontal and vertical pixel density, with a resolution unit of inches, centimeters, or no unit
  • The pixel aspect ratio, which a program works out from the 2 density values
  • An optional small preview of the image, called a thumbnail

JFIF also sets the color model. A JFIF image has 1 channel with brightness only, or 3 channels in the YCbCr color space.

Which files carry it

The MIME type image/jpeg was defined for JPEG images in the JFIF format. The file extensions .jpg, .jpeg, .jpe, .jif, and .jfif all belong to this format. So a file whose name ends in .jfif holds the same kind of image as a .jpg file.

Digital cameras usually save JPEG photos in the Exif format instead. Exif stores its metadata mainly in an APP1 segment, and this segment must also come directly after the start of the image. Because both segments must come first, a file cannot follow JFIF and Exif at the same time.

Some programs still write a JFIF segment in front of the Exif segment. In such a file, you see both a JFIF version and an Exif version.

What the values look like

The JFIF version is stored in 2 bytes. The first byte holds the major version, and the second byte holds the minor version. Version 1.02 is stored as the bytes 01 and 02.

ExifTool shows the field as JFIFVersion. It prints the major number, a dot, and a 2-digit minor number. Format registries list 3 versions of JFIF:

  • 1.00: an early version of the specification
  • 1.01: the version before 1.02
  • 1.02: the version from September 1, 1992

Where the value comes from

The program that saves the JPEG file writes the APP0 segment and the version number in it. The ITU published JFIF as Recommendation T.871 in 2011, and ISO and IEC publish the same text as ISO/IEC 10918-5. This standard is based on version 1.02, and files that follow it must store the value 1.02.

Programs built on the libjpeg library write 1.01 by default. Its documentation says to set 1.02 when a program adds an extension segment from version 1.02. So a file saved today can show 1.01 or 1.02.

Why it matters for your file

The version tells a program whether it can read the JFIF data. The specification says that a file can usually be decoded when its major version matches the major version that the program supports.

The version also shows which thumbnails the file can hold. An extension segment called JFXX is allowed only in version 1.02 and later. The JFXX segment can hold a thumbnail compressed with JPEG or an uncompressed thumbnail.

A JPEG file without a JFIF version has no JFIF segment. This is normal for photos that a camera saved in the Exif format.