Skip to content

feat(f5): jpeg quality estimate - #246

Merged
sassman merged 4 commits into
mainfrom
feat/jpeg-quality-estimate
Feb 20, 2026
Merged

sassman merged 4 commits into
mainfrom
feat/jpeg-quality-estimate

Conversation

@sassman

@sassman sassman commented Feb 20, 2026

Copy link
Copy Markdown
Member
  • Implements the ImageMagick heuristic for estimating JPEG encoding quality from quantization tables.
  • Uses dual hash+sums threshold scan with reference arrays from the standard IJG tables.
  • Handles both grayscale and color JPEGs, with deduplication of per-component tables for correct qsum computation.
  • Tested against ImageMagick-generated JPEGs at qualit es 10-100 (grayscale and color) with 0 deviation, plus our custom encoder output.

…ty detection

- Implements the ImageMagick heuristic for estimating JPEG encoding quality
from quantization tables.
- Uses dual hash+sums threshold scan with reference
arrays from the standard IJG tables.
- Handles both grayscale and color JPEGs, with deduplication of per-component tables for correct qsum computation.
- Tested against ImageMagick-generated JPEGs at qualit es 10-100 (grayscale and color) with 0 deviation, plus our custom encoder output.
Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
- color images exercise the HASH_COLOR/SUMS_COLOR code path which is the real-world case
- grayscale VESSEL-derived images only tested the gray path
- all 10 quality levels (10–100) now generated from a single color source via ImageMagick

Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
@codecov

codecov Bot commented Feb 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.63636% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.53%. Comparing base (2dbd1ce) to head (047d2ff).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/stegano-f5/src/quality.rs 87.23% 6 Missing ⚠️
crates/stegano-f5/src/jpeg_ops.rs 98.41% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
+ Coverage   86.44%   86.53%   +0.09%     
==========================================
  Files          38       39       +1     
  Lines        5023     5133     +110     
==========================================
+ Hits         4342     4442     +100     
- Misses        681      691      +10     
Files with missing lines Coverage Δ
crates/stegano-f5/src/jpeg_ops.rs 96.56% <98.41%> (+0.58%) ⬆️
crates/stegano-f5/src/quality.rs 87.23% <87.23%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
@sassman
sassman added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit 5627354 Feb 20, 2026
19 checks passed
@sassman
sassman deleted the feat/jpeg-quality-estimate branch February 20, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant