JFIF File - What Is A .jfif File? - File Format Docs

What is a JFIF file?

JFIF (JPEG File Interchange Format (JFIF)) is an image format file that uses the .jfif extension. JFIF builds over JIF (JPEG Interchange Format) by reducing complexity and solving its limitations.

Brief History of JFIF

JFIF document development was led by Eric Hamilton and an agreement on the first version was established in late 1991. Version 1.02 was published on September 7, 1992. RFC 2046 specified that the JFIF format is used to transmit JPEG images over the internet. JFIF was published by ECMA in 2009 and was standardized by ITU-T in 2011 as its Recommendation T.871 and by ISO/IEC in 2013 as ISO/IEC 10918-5

JFIF File Format

A JFIF file consists of a sequence of markers as defined in part 1 of the JPEG Standard. Each marker consists of two bytes (FF followed by a byte that specifies the type of marker). Markers can either be stand-alone or indicate the start of a marker segment.

JFIF allows multiple components like Y, Cb, Cr, to have different resolutions but their alignment is not defined. Unlike JPEG, JFIF can provide resolution and aspect ratio information. JFIF also defines the color model to be used.

File Structure

SegmentCodeDescription
SOIFF D8Start of Image
JFIF-APP0FF E0 s1 s2 4A 46 49 46 00 …
JFXX-APP0FF E0 s1 s2 4A 46 58 58 00 …
additional marker segments
SOSFF DAStart of Scan
compressed image data
EOIFF D9End of Image

The JFIF Standard defines the following segments:

JFIF APP0 marker segment

It is a mandatory segment containing image parameters. It can also contain an embedded uncompressed thumbnail.

FieldSize (bytes)Description
APP0 marker2FF E0
Length2Length of segment excluding APP0 marker
Identifier5JFIF (4A 46 49 46 00) in ASCII terminated by a null byte
JFIF version2Version of the JFIF
Density units1Unit for the following pixel density fields 00 : No units; width:height pixel aspect ratio is equal to Ydensity:Xdensity 01 : Pixels per inch 02 : Pixels per centimeter
Xdensity2Horizontal pixel density greater than zero
Ydensity2Vertical pixel density greater than zero
Xthumbnail1Horizontal pixel count of the embedded RGB thumbnail. May be zero
Ythumbnail1Vertical pixel count of the embedded RGB thumbnail. May be zero
Thumbnail data3 × nUncompressed 24 bit RGB raster thumbnail data

JFIF extension APP0 marker segment

This is an optional section that if defined, must immediately follow the JFIF APP0 marker segment. This section is supported by JFIF version 1.02 and above and allows the embedding of thumbnails in three different formats.

FieldSize (bytes)Description
APP0 marker2FF E0
Length2Length of the segment excluding APP0 marker
Identifier5JFXX (4A 46 58 58 00) in ASCII terminated by a null byte
Thumbnail format1Specifies what data format is used for the following embedded thumbnail:10 : JPEG format11 : 1 byte per pixel palettized format13 : 3 byte per pixel RGB format
Thumbnail datavariable

Conversion of JFIF to Other Image File Formats

JFIF can be converted to popular image file formats such as PNG, JPG, and PDF.

References

  • JFIF - Wikipedia

Tag » What Is A Jfif File