How to get raw jpeg data (but no metatags / proprietary markers)

Posted by CoolAJ86 on Stack Overflow See other posts from Stack Overflow or by CoolAJ86
Published on 2009-12-29T19:39:15Z Indexed on 2010/04/06 2:33 UTC
Read the original article Hit count: 387

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about jpeg

Related posts about exif