danielgtaylor / danielgtaylor/jpeg-archive

Looking for some clarification on the code's capabilities

Open
#71 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.2k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

I initially thought from the documentation that I could run jpeg-recompress against a high quality jpeg and it would produce a visually identical jpeg at a reduced file size: "Compress JPEGs by re-encoding to the smallest JPEG quality while keeping perceived visual quality the same ... This is a lossy operation, but the images are visually identical..."

However, two things confuse me and I wondered if you could clarify them for me so I can get the most out of this excellent code?

1. Some of the images that are produced show a lot of those strange jpeg compression blocks and striated shadows. I originally found that issue using "jpeg-recompress --quality high --accurate --method smallfry --min 60 input.jpg output.jpg". I switched to SSIM and had better luck, but I'm confused as I thought the whole point was that it would always save out something that was visually identical to the input? Am I misunderstanding that? Or would this be a bug?

2. The quality settings also confuse me. If the script is supposed to produce visually identical images at "Medium" setting, what are the High and Veryhigh settings for? And equally, does Low imply that the output will be less visually identical? I'm confused.

Thanks for any clarification you can offer me on these points, and for all the hard work you've put into this.

Original 100% quality JPEG from photoshop
![orig-100](https://user-images.githubusercontent.com/1316196/34184554-3de3854c-e4d5-11e7-9163-e9f07e7fca54.jpg)
--quality medium --loops 20 --method ssim --accurate
![ssim-medium](https://user-images.githubusercontent.com/1316196/34184776-6da56664-e4d6-11e7-9c9e-e6fb41a795b9.jpg)

--quality high --loops 20 --method ssim --accurate
![ssim-high](https://user-images.githubusercontent.com/1316196/34184785-7294bac6-e4d6-11e7-842b-80c96263cb88.jpg)

--quality medium --loops 20 --method smallfry --accurate
![smallfry-medium](https://user-images.githubusercontent.com/1316196/34184787-776df9ea-e4d6-11e7-9f18-9890606d5444.jpg)

--quality high --loops 20 --method smallfry --accurate
![smallfry-high](https://user-images.githubusercontent.com/1316196/34184788-7c21e4f6-e4d6-11e7-8512-21d019acf7a7.jpg)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the quoted documentation and the example jpeg-recompress commands using the medium and high quality settings, SSIM, and smallfry methods. Reproduce the reported outputs if the example images remain available, then trace how the documentation describes visual similarity and quality levels. Done means the quality-setting behavior and the reported artifacts are clearly explained or the documentation is corrected.

Written by the indexing model from the issue text.

Assessment

Domain
cli, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.