views:

214

answers:

1

I want to get raw jpeg data - no metadata. I'm very confused looking at the jpeg "standards".

How correct is my understanding of the marker "tree"?

0xFFD8 - Identifies the file as an image
    0xFFE? - EXIF, JFIF, SPIFF, ICC, etc 
        0x???? - the length of the tag
    0xFFD8 - Start of Image
        0xFFE0 - should follow SOI as per spec, but often preceded by comments ???
        0x???? - Matrices, tags, random data ???

        There are never other markers in-between these markers? 
        Or these include the matrices and such?
        0xFFDA - Start of Stream - This is what I want, yes?
            0xXXXX - length of stream
            0xFFD9 - End of Stream (EOI)

        0x???? - Comment tags, extra exif, jfif info???
0xFFD9 - End of Image

0xFF00 - escaped 0xFF, not to be confused with a marker

This has been my reading material:

http://en.wikipedia.org/wiki/JPEG

http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/JPEG.html

http://www.media.mit.edu/pia/Research/deepview/exif.html

http://www.faqs.org/faqs/jpeg-faq/part1/section-15.html

A: 

Besides the SOS (0xFFDA), you may also want the following:

0xFFDB DQT Quantization Table 0xFFC4 DHT Define Huffman Table

Carlo Mendoza