JEITA CP-3451 - 58 - 4.7    JPEG Marker Segments Used in Exif In addition to the compressed data (Interoperability coded data), a compressed file contains one each of the marker segments  APP1,  DQT,  DHT,  SOF  and  SOS.  The  compressed  data  begins  with  an  SOI  and  ends  with  an  EOI marker. A restart marker (DRI, RSTm) may be inserted optionally. Another option is to have two or more APP2 marker segments. APPn other than APP1 and APP2 or COM segments are not used by Exif. However Exif readers should be designed skip over unknown APPn and COM. APP1 shall be recorded immediately after SOI, and if there is an APP2 it follows after APP1. DQT, DHT, DRI and SOF come after APP2 and before SOS, in any order. The marker segments used in Exif are listed in Table 18. Table 18    Marker Segments Marker Name Marker Code Description SOI Start of Image FFD8.H Start of compressed data APP1 Application Segment 1 FFE1.H Exif attribute information   APP2 Application Segment 2 FFE2.H Exif extended data DQT Define Quantization Table FFDB.H Quantization table definition DHT Define Huffman Table FFC4.H Huffman table definition DRI Define Restart Interoperability FFDD.H Restart Interoperability definition SOF Start of Frame FFC0.H Parameter data relating to frame SOS Start of Scan FFDA.H Parameters relating to components EOI End of Image FFD9.H End of compressed data The data structures of markers defined in JPEG Baseline DCT and used in Exif compressed files, as well as the APP1 and APP2 data structures defined specifically for this standard, are explained below. 4.7.1   JPEG Marker Segments The data structure of JPEG marker segments other than APP1 and APP2 is noted below. A.    Start of compressed data (SOI: Start of Image) SOI is a marker code indicating the start of compressed data (see Figure 18). Address Offset Code Meaning (Hex) (Hex) +00 FF Marker Prefix +01 D8 SOI Figure 18    SOI Structure