JPEG文件量化表定义

发布于 2025-01-05 12:12:57 字数 710 浏览 1 评论 0原文

当我使用 Photoshop 另存为功能并选择 jpeg 文件格式时,我会看到以下窗口:

在此处输入图像描述

如您所见,我选择基线(“标准”)格式和最高图像质量。当我在十六进制编辑器中打开这张图片时,我看到几个 FF DB 标记(这是量化表的开始)。还没有问题,但让我们看下一张图片: 在此处输入图像描述

正如您在上面的表格图片中看到的那样,在地址行 BDA 处启动 FFDB 标记。前两个字节是 00 84,这意味着该标记保存 132 字节的数据。做一些数学计算,我们可以得出结论,该标记定义了两个量化表。第一个表的值为:0C 08 08 08 09 等...

在同一个文件中,还有另一个 FFDB 标记,从 2885 地址行开始,如图所示:

在此处输入图像描述

同样,前两个字节的值为 00 84,这意味着 132 字节的数据。但这一次,第一个量化表值是:01 01 01 等...

如何知道应该使用哪个 FF DB 标记,以及为什么文件中有多个 FFDB 标记?< /强>

When I use Photoshop Save As function, and pick jpeg file format I get following window:

enter image description here

As you can see, I select Baseline ("Standard") format, and maximum picture quality. When I open this picture in Hex editor, I see several FF DB markers (which is start of Quantization table/s). No problem yet, but lets look next picture:
enter image description here

As you can see form picture above, at address row BDA starts FFDB marker. First two bytes are 00 84 which means that this marker holds 132 bytes of data. Doing some math, we can conclude that two Quantization tables are defined by this marker. Values of first table are: 0C 08 08 08 09 etc...

In the same file, there is another FFDB marker, starting from 2885 address row, as you can see in picture:

enter image description here

Again, value of first two bytes are 00 84 which means 132 bytes of data. But this time, first Quantization table values are: 01 01 01 etc...

How to know which of FF DB markers should I use, and why there is several FFDB markers in file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷心人i 2025-01-12 12:12:57

如果没有看到整个文件,很难确定,但看起来您的第一个量化表是用于以较低质量压缩的嵌入缩略图。第二个量化表用于主图像,其值为 01,01,01,...,因为您选择了最高质量,因此系数值被量化为尽可能少的量。

Without seeing the entire file, it's hard to say with certainty, but it looks like your first quantization table is for an embedded thumbnail which is compressed with a lower quality. The second quantization table is for the main image and has values of 01,01,01,... because you chose the highest quality and therefore the coefficient values are quantized the least possible amount.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文