如何获取原始 jpeg 数据(但没有元标记/专有标记)
我想获取原始 jpeg 数据 - 没有元数据。 我对 jpeg“标准”感到非常困惑。
我对标记“树”的理解有多正确?
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
这是我的阅读材料:
http://en.wikipedia.org/wiki/JPEG
https://ExifTool.org/TagNames/JPEG.html
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
除了 SOS (0xFFDA),您可能还需要以下内容:
0xFFDB DQT 量化表
0xFFC4 DHT定义哈夫曼表
Besides the SOS (0xFFDA), you may also want the following:
0xFFDB DQT Quantization Table
0xFFC4 DHT Define Huffman Table
有一个相当合理的“JPEG 剖析” 这里< /a> 向您展示如何使用
grep
从 JPEG 文件中提取 JPEG 标记和部分,例如SOF
标记:解释
并且有一个此处的完整、高度详细和全面的视频系列 < strong>YouTube 可以告诉您有关 JPEG 的更多信息,超出您的想象。
另请注意,您可以使用
exiftool
提取并检查文件中的 JPEG 标记,如下所示:示例输出
关键字:JPEG、标记、解剖学、SOF、DQT、DHT、素数。
There's a fairly reasonable "Anatomy of a JPEG" here which shows you how to use
grep
to extract JPEG markers and sections from JPEG files, e.g. forSOF
marker:Explanation
And there's a complete, highly detailed and thorough series of videos here on YouTube that tell you more than you could possibly ever want to know about JPEG.
Note also that you can extract and examine the JPEG markers in a file with
exiftool
, like this:Sample Output
Keywords: JPEG, marker, anatomy, SOF, DQT, DHT, prime.