Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
270 views
in Technique[技术] by (71.8m points)

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

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

https://ExifTool.org/TagNames/JPEG.html

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

0xFFDB DQT Quantization Table 0xFFC4 DHT Define Huffman Table


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...