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:

    The motive of science was the extension of man, on all sides, into Nature, till his hands should touch the stars, his eyes see through the earth, his ears understand the language of beast and bird, and the sense of the wind; and, through his sympathy, heaven and earth should talk with him. But that is not our science.
    Ralph Waldo Emerson (1803–1882)