Repository navigation
Fennec v1.0.2 π¦ β Human-Readable Sizes & Transparency Fixes
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-sizeflag 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
-ssimfloat 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-orientflag 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.gowhere fallback encoding errors (both PNG and JPEG) were being silently dropped.
βοΈ Under the Hood & Optimizations
- Lossless JPEG Optimization: Added a guard that clamps
targetSSIMto0.999for JPEGs. Since JPEG is an inherently lossy format, this prevents the binary search from wasting iterations trying to reach an impossible1.0score. - 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