Skip to content

Releases: bortoq/fb2opt

Release list

fb2opt 4.17

Choose a tag to compare

@bortoq bortoq released this 13 Sep 07:52

What changed

  • Still images unified to PNG/JPEG — mode-native crossover (gray stays gray, palette stays palette), BMP color-gate bypass, image/jpg canonicalized to image/jpeg. No GIF/BMP leftovers except animation, transparency, EXIF/ICC carriers, multi-page TIFFs (SVG stays SVG).
  • Bilevel safety hardened — the Otsu band guards the cut actually used, a localized smooth-patch veto rejects narrow-tone photo inlays before the metric (audit-scale inlays verified: dark/light/gray), gray paper still goes 1-bit.
  • EXIF orientation applied before EXIF-dropping passes — JPEGs rotate via jpegtran without re-encoding (triple-checked); keep-everything fallback where no lossless transpose exists.
  • Reproducible bench.py, C901 complexity ratchet in CI, README badges + History, full audit report in doc/audit.md ([APPROVED], 9.43/10).

Verification

  • 223 tests green (was 189), incl. golden runs on real ect/ffmpeg/jpegtran; hermetic run green (5 skips)
  • ruff F/B/UP + C901 gates green; lossless corpus byte-parity vs previous release (15/16 identical, 1 file only MIME-spelling)
  • python3 bench.py [--lossy] [BOOKS...] — sizes, md5 determinism, wall time

Requires Python 3.9+ (stdlib only); ect/oxipng/jpegtran/Pillow/ffmpeg optional with graceful degradation.