google / google/jpegli

Grayscale images always use standard quant tables

Open
#98 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
401
Forks
66
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Due to a [check in quant.cc](https://github.com/google/jpegli/blob/9e21f7e38283fe0837be763e02d97b7f4988831f/lib/jpegli/quant.cc#L651), any grayscale image will always use the standard quant tables even if the std_quant feature is not enabled. This is resulting in significantly worse quality/compression rates.

**To Reproduce**

Compress any grayscale (single channel) image using cjpegli, observe that you get the same output whether you use the "--std_quant" option or not.

**Expected behavior**

Difference in file size / quality when "--std_quant" is used

**Environment**

Should repro for any build config

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.