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.
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 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.
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.
Start of Image
FF E0 s1 s2 4A 46 49 46 00 …
FF E0 s1 s2 4A 46 58 58 00 …
additional marker segments
Start of Scan
compressed image data
End 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.
Length of segment excluding APP0 marker
JFIF (4A 46 49 46 00) in ASCII terminated by a null byte
Version of the JFIF
Unit 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
Horizontal pixel density greater than zero
Vertical pixel density greater than zero
Horizontal pixel count of the embedded RGB thumbnail. May be zero
Vertical pixel count of the embedded RGB thumbnail. May be zero
3 × n
Uncompressed 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.
Length of the segment excluding APP0 marker
JFXX (4A 46 58 58 00) in ASCII terminated by a null byte
Specifies 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
How to open JFIF files
JFIF files can be opened by the majority of the image software including the following: