如何读取jpeg量子化表?

时间:2022-10-29 21:20:07

How do I extract the quantization coefficients from a jpeg file on Linux?

如何从Linux上的jpeg文件中提取量化系数?

I know they're in there somewhere!

我知道他们就在那里!

I see how to get them in Java: Reading quantization tables of jpeg files in Java

我看到了如何在Java中获取它们:在Java中读取jpeg文件的量化表

1 个解决方案

#1


8  

djpeg does the trick

djpeg的技巧

$ djpeg -verbose -verbose foo.jpg > /dev/null
Independent JPEG Group's DJPEG, version 9  13-Jan-2013
Copyright (C) 2013, Thomas G. Lane, Guido Vollbeding
Start of Image
JFIF APP0 marker: version 1.01, density 72x72  1
Define Quantization Table 0  precision 0
           1    1    1    1    2    3    4    5
           1    1    1    2    2    5    5    4
           1    1    1    2    3    5    6    4
           1    1    2    2    4    7    6    5
           1    2    3    4    5    9    8    6
           2    3    4    5    6    8    9    7
           4    5    6    7    8   10   10    8
           6    7    8    8    9    8    8    8
Define Quantization Table 1  precision 0
           1    1    2    4    8    8    8    8
           1    2    2    5    8    8    8    8
           2    2    4    8    8    8    8    8
           4    5    8    8    8    8    8    8
           8    8    8    8    8    8    8    8
           8    8    8    8    8    8    8    8
           8    8    8    8    8    8    8    8
           8    8    8    8    8    8    8    8

#1


8  

djpeg does the trick

djpeg的技巧

$ djpeg -verbose -verbose foo.jpg > /dev/null
Independent JPEG Group's DJPEG, version 9  13-Jan-2013
Copyright (C) 2013, Thomas G. Lane, Guido Vollbeding
Start of Image
JFIF APP0 marker: version 1.01, density 72x72  1
Define Quantization Table 0  precision 0
           1    1    1    1    2    3    4    5
           1    1    1    2    2    5    5    4
           1    1    1    2    3    5    6    4
           1    1    2    2    4    7    6    5
           1    2    3    4    5    9    8    6
           2    3    4    5    6    8    9    7
           4    5    6    7    8   10   10    8
           6    7    8    8    9    8    8    8
Define Quantization Table 1  precision 0
           1    1    2    4    8    8    8    8
           1    2    2    5    8    8    8    8
           2    2    4    8    8    8    8    8
           4    5    8    8    8    8    8    8
           8    8    8    8    8    8    8    8
           8    8    8    8    8    8    8    8
           8    8    8    8    8    8    8    8
           8    8    8    8    8    8    8    8