Skip to content

Fennec v1.0.2 🦊 β€” Human-Readable Sizes & Transparency Fixes

Choose a tag to compare

@shamspias shamspias released this 10 Mar 06:11
· 8 commits to main since this release
0f3b6b2

What's New in Fennec v1.0.2 πŸŽ‰

This release brings the CLI fully up to date with our documented features, introduces user-friendly target sizing, and fixes a few crucial bugs under the hood regarding transparency and error handling.

✨ New Features & CLI Improvements

  • Human-Readable Target Sizes: The -target-size flag now accepts friendly string inputs! You can easily pass values like "100KB", "2MB", or "1.5GB" in addition to raw byte counts.
  • Custom SSIM Targeting: Added the -ssim float flag (0.0–1.0) to the CLI, allowing you to easily override quality presets with a specific structural similarity target.
  • Orientation Control: Added the -no-orient flag to disable EXIF auto-rotation from the command line.

πŸ› Bug Fixes

  • Alpha Channel Preservation: Fixed an issue in GaussianBlur() where the alpha channel was unintentionally blurred, causing weird edges on transparent images. Blurs now strictly target RGB channels while perfectly preserving original transparency.
  • Strict Error Handling: Patched 4 instances in targetsize.go where fallback encoding errors (both PNG and JPEG) were being silently dropped.

βš™οΈ Under the Hood & Optimizations

  • Lossless JPEG Optimization: Added a guard that clamps targetSSIM to 0.999 for JPEGs. Since JPEG is an inherently lossy format, this prevents the binary search from wasting iterations trying to reach an impossible 1.0 score.
  • Cleanups: Removed unused dead code (compressJPEGToSize()) to keep the codebase lean.
  • Test Coverage: Added 11 new test cases for the size parser, plus extensive test coverage for the new CLI flags. All 18+ seconds of tests are passing flawlessly!

Full Changelog: v2.0.0...v2.1.0