| |
 |
|
|
Science Forum Index » Image Processing Forum » how do you find the quality setting of a jpeg
Page 1 of 1
|
| Author |
Message |
| Guest |
Posted: Wed Apr 23, 2008 11:07 am |
|
|
|
|
using libjpeg, can I find what the quality parameter was when creating
that jpeg? |
|
|
| Back to top |
|
| Thomas Richter |
Posted: Thu Apr 24, 2008 2:07 am |
|
|
|
Guest
|
byaarov@yahoo.com schrieb:
Quote: using libjpeg, can I find what the quality parameter was when creating
that jpeg?
Not really, and basically because JPEG doesn't *define* a quality
parameter. It defines a set of quantization bucket sizes, and the IJG
implementation derives those tables from a quality parameter and an
"example table" given by the standard. The IJG formula is, however, more
or less "arbitrary", so is the example table, and a different code need
not to follow the IJG choice to write a compliant JPEG.
The IJG code reads, of course, the quantization tables in the input
file. It can surely be hacked up to make them accessible, but I doubt
the lib comes with an interface for that.
So long,
Thomas |
|
|
| Back to top |
|
| Martin Brown |
Posted: Thu Apr 24, 2008 4:07 am |
|
|
|
Guest
|
Thomas Richter wrote:
Quote: byaarov@yahoo.com schrieb:
using libjpeg, can I find what the quality parameter was when creating
that jpeg?
Not really, and basically because JPEG doesn't *define* a quality
parameter. It defines a set of quantization bucket sizes, and the IJG
implementation derives those tables from a quality parameter and an
"example table" given by the standard. The IJG formula is, however, more
or less "arbitrary", so is the example table, and a different code need
not to follow the IJG choice to write a compliant JPEG.
Although this is true, a sufficiently large number of codecs use a
scaled version of the canonical quantisation matrices given as an
example in the orginal JPEG standard that the DUMPJPEG command line
utility could make a half decent stab at the nominal quality.
It wasn't ideal and for custom quantisation tables and most notably
Photoshop would only give approximate results. And these days PSPro v8
and above (which only manages approximate JPEG encoding with a broken
codec). Some cameras also use their own custom tables.
Quote:
The IJG code reads, of course, the quantization tables in the input
file. It can surely be hacked up to make them accessible, but I doubt
the lib comes with an interface for that.
I thought the source for DUMPJPEG was in the distribution somewhere?
I can't see it in my copy of 6B though.
Regards,
Martin Brown
** Posted from http://www.teranews.com ** |
|
|
| Back to top |
|
| Edward Rosten |
Posted: Thu Apr 24, 2008 8:50 pm |
|
|
|
Guest
|
On Apr 24, 1:07 am, Thomas Richter <t...@math.tu-berlin.de> wrote:
Quote: byaa...@yahoo.com schrieb:
using libjpeg, can I find what the quality parameter was when creating
that jpeg?
Not really, and basically because JPEG doesn't *define* a quality
parameter. It defines a set of quantization bucket sizes, and the IJG
implementation derives those tables from a quality parameter and an
"example table" given by the standard. The IJG formula is, however, more
or less "arbitrary", so is the example table, and a different code need
not to follow the IJG choice to write a compliant JPEG.
The IJG code reads, of course, the quantization tables in the input
file. It can surely be hacked up to make them accessible, but I doubt
the lib comes with an interface for that.
To get tables on stderr:
djepg -v -v file.jpg > /dev/null
-Ed
--
(You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)
/d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Fri Jul 04, 2008 5:24 pm
|
|