Open davidenco opened 6 years ago
@davidenco I am not the author of this program, but I figured this one out for you. If you look at the source code of jpeg-recompress then you can see that when no target parameter is passed via the command line then a target will be automatically set depending of the actual quality setting. Please see the source code of jpeg-recompress from line 117. You can see in there that the actual target value used also depends on the comparison method used. The target values are NOT the same for all the methods! So if you are using the 'ms-ssim' method then by default this target value will be used:
case MEDIUM:
target = 0.94;
If you are specifying a target "by hand" on the command line (e.g. --target 0.9999
) which is different than that value then the resulting output image will be different, too.
FYI: 0.9999
is even higher than the VERYHIGH
setting when using the ms-ssim method. Probably this is why you got a much larger image as a result.
Please also note that the max value is set to 95 by default. So using ms-ssim with a very high target values such as target=0.9999
with no max set to e.g. 99, does not seem to make too much sense, after all.
If you want more info regarding the min and the max settings then I suggest you read this blog post:
https://mika-s.github.io/javascript/jpeg/compression/algorithm/2018/01/10/quality-min-and-max-with-jpeg-recompress.html
I am using the default target of
0.9999
and thems-ssim
method, but I've noticed the output quality is always what themin
setting is set to, as follows:If I specify the target and use the same value as the default, I get completely different results: