JPEG File Interchange Format, Version 1.02
6
JFIF Extension APP0 Marker Segment
Immediately following the JFIF APP0 marker segment may be a JFIF extension APP0
marker. This JFIF extension APP0 marker segment may only be present for JFIF versions
1.02 and above. The syntax of the JFIF extension APP0 marker segment is:
X'FF', APP0, length, identifier, extension_code, extension_data
length (2
bytes)
Total APP0 field byte count, including the byte
count value (2 bytes), but excluding the APP0
marker itself
identifier
(5 bytes)
= X'4A', X'46', X'58', X'58', X'00'
This zero terminated string ("JFXX") uniquely
identifies this APP0 marker. This string shall
have zero parity (bit 7=0).
extension_code
(1 byte)
= Code which identifies the extension. In this
version, the following extensions are defined:
= X'10' Thumbnail coded using JPEG
= X'11' Thumbnail stored using 1 byte/pixel
= X'13' Thumbnail stored using 3 bytes/pixel
extension_data
(variable) = The specification of the remainder of the JFIF
extension APP0 marker segment varies with the
extension. See below for a specification of
extension_data for each extension.
JFIF Extension: Thumbnail coded using JPEG
This extension supports thumbnails compressed using JPEG. The compressed thumbnail
immediately follows the extension_code (X'10') in the extension_data field and the length
of the compressed data must be included in the JFIF extension APP0 marker length field.
The syntax of the extension_data field conforms to the syntax for interchange format
defined in Annex B of ISO DIS 10918-1. However, no "JFIF" or "JFXX" marker
segments shall be present. As in the full resolution image of the JFIF file, the syntax of
extension_data constrains parameters in the frame header as defined below:
X'FF', SOI
·
·
·
X'FF', SOFn, length, frame parameters
Number of components
Nf
= 1 or 3
1st component
C
1
= 1 = Y component
2nd component
C
2
= 2 = Cb component
3rd component
C
3
= 3 = Cr component
·
·
·
X'FF', EOI