A jpeg file consists of eight parts. Each part has two marked bytes, and the first byte is fixed to 0xff. Of course, you can add multiple 0xff before the part. The last part prevails. The following describes the names of each part and the value of the second mark byte. The starting position of each part can be found using the hexadecimal search function of ultraedit, similar numerical matching methods can be used in embedded systems for locating.
I. Start of the image (start of image) Mark, value 0 x D8
2. app0 mark (Marker), value 0 x E0
1. app0 length (length)
2. identifier)
3. Version)
4. Unit of density of X and Y (Units = 0: No unit; Units = 1: Points/inch; Units = 2: Points/cm)
5. X-direction pixel density (x density)
6. y Density)
7. Number of horizontal pixels of a thumbnail (thumbnail horizontal pixels)
8. Number of vertices (thumbnail vertical pixels)
9. The thumbnail RGB Bitmap (thumbnail RGB Bitmap) is determined by the preceding value. The value 3N and n are the total pixels of the thumbnail.
3. Appn mark (markers), where n = 1 ~ 15. The value corresponds to 0xe1 ~ 0xef
1. Appn length (length)
2. Application Specific information)
4. One or more quantified tables, dqt (difine quantization table), and 0xdb
1. quantization table length)
2. quantization table number)
3. quantization table)
5. frame image start sof0 (start of frame), value 0xc0
1. Start of Frame Length)
2. Precision: bits per pixel per color component)
3. Image Height)
4. Image Width)
5. Number of color components)
6. For each component)
Including: ID, vertical sample factor, horizontal sample factor, and quantization table #)
6. One or more Hoffmann table DHT (difine Huffman table) and the value 0xc4
1. Length of the Hoffman table (Huffman table length)
2. type, AC or DC (type, AC or DC)
3. Index)
4. Bit table)
5. value table)
VII. Start of scan (SOS), value 0 x da
1. Start of scan length)
2. Number of color components)
3. Each color component
Including: ID, AC table number (AC table #), DC table number (DC table #)
4. compressed image data)
8. Image end EOI (end of image), value 0 x D9
A jpeg file consists of eight parts. Each part has two marked bytes, and the first byte is fixed to 0xff. Of course, you can add multiple 0xff before the part. The last part prevails. The following describes the names of each part and the value of the second mark byte. The starting position of each part can be found using the hexadecimal search function of ultraedit, similar numerical matching methods can be used in embedded systems for locating.
I. Start of the image (start of image) Mark, value 0 x D8
2. app0 mark (Marker), value 0 x E0
1. app0 length (length)
2. identifier)
3. Version)
4. Unit of density of X and Y (Units = 0: No unit; Units = 1: Points/inch; Units = 2: Points/cm)
5. X-direction pixel density (x density)
6. y Density)
7. Number of horizontal pixels of a thumbnail (thumbnail horizontal pixels)
8. Number of vertices (thumbnail vertical pixels)
9. The thumbnail RGB Bitmap (thumbnail RGB Bitmap) is determined by the preceding value. The value 3N and n are the total pixels of the thumbnail.
3. Appn mark (markers), where n = 1 ~ 15. The value corresponds to 0xe1 ~ 0xef
1. Appn length (length)
2. Application Specific information)
4. One or more quantified tables, dqt (difine quantization table), and 0xdb
1. quantization table length)
2. quantization table number)
3. quantization table)
5. frame image start sof0 (start of frame), value 0xc0
1. Start of Frame Length)
2. Precision: bits per pixel per color component)
3. Image Height)
4. Image Width)
5. Number of color components)
6. For each component)
Including: ID, vertical sample factor, horizontal sample factor, and quantization table #)
6. One or more Hoffmann table DHT (difine Huffman table) and the value 0xc4
1. Length of the Hoffman table (Huffman table length)
2. type, AC or DC (type, AC or DC)
3. Index)
4. Bit table)
5. value table)
VII. Start of scan (SOS), value 0 x da
1. Start of scan length)
2. Number of color components)
3. Each color component
Including: ID, AC table number (AC table #), DC table number (DC table #)
4. compressed image data)
8. Image end EOI (end of image), value 0 x D9