JPEG File Interchange Format - File Format Structure - JFIF Extension (JFXX) Segment Format

JFIF Extension (JFXX) Segment Format

An optional second application segment allows a thumbnail image to be embedded using several different image formats (to save space).

Field Size (bytes) Description
APP0 marker 2 Always equals 0xFFE0
Length 2 Length of segment excluding APP0 marker
Identifier 5 Always equals "JFXX" (with zero following) (0x4A46585800)
Thumbnail format 1 Specifies what data format is used for the thumbnail:
  • 0x10 - JPEG format
  • 0x11 - 1 byte per pixel palettised format
  • 0x13 - 3 byte per pixel RGB format
Thumbnail data Variable

JPEG
Must be JIF format using YCbCr or just Y, and must not contain JFIF or JFXX segments.

One byte per pixel
Field Size (bytes) Description
Thumbnail width (tw) 1 Horizontal size of embedded palettised thumbnail in pixels
Thumbnail height (th) 1 Vertical size of embedded palettised thumbnail in pixels
Thumbnail palette 768 256 palette entries giving 24-bit colour values
Thumbnail data tw × th Pixel data - each value gives a position within the palette.
Three bytes per pixel
Field Size (bytes) Description
Thumbnail width (tw) 1 Horizontal size of embedded RGB thumbnail in pixels
Thumbnail height (th) 1 Vertical size of embedded RGB thumbnail in pixels
Thumbnail data 3 × tw × th Uncompressed 24 bit RGB raster thumbnail

Read more about this topic:  JPEG File Interchange Format, File Format Structure

Famous quotes containing the word extension:

    We know then the existence and nature of the finite, because we also are finite and have extension. We know the existence of the infinite and are ignorant of its nature, because it has extension like us, but not limits like us. But we know neither the existence nor the nature of God, because he has neither extension nor limits.
    Blaise Pascal (1623–1662)