Add feature to automatically determine chroma subsampling for JPEG images.
While most images are optimal with 420 chroma subsampling, some images with high contrast colors have a smaller file size with 422 or 444 subsampling. This PR adds a feature where all subsamplings are tested when compressing JPEG files and the subsampling with closest SSIM is selected.
This feature is on by default but can be disabled by specifying chroma subsampling manually, for example:
pio image.jpg --output output.jpg --chroma-subsampling=420
Add feature to automatically determine chroma subsampling for JPEG images.
While most images are optimal with 420 chroma subsampling, some images with high contrast colors have a smaller file size with 422 or 444 subsampling. This PR adds a feature where all subsamplings are tested when compressing JPEG files and the subsampling with closest SSIM is selected.
This feature is on by default but can be disabled by specifying chroma subsampling manually, for example:
Fixes #13