github rupor-github/fb2cng v1.9.2

2 hours ago

New features: Image Handling and SVG Improvements

Native vector artwork

  • PDF and Kindle KFX/AZW8 now preserve supported SVG artwork as vectors, keeping illustrations, vignettes, and built-in image placeholders sharp when enlarged.
  • PDF also preserves supported SVG covers, including the built-in fallback cover. Kindle covers remain JPEG.
  • Supports standard shapes and paths, groups, solid fills, transparency, supported transforms, and detailed stroke styling—including square caps, bevel joins, miter limits, and dashed strokes.
  • Unsupported artwork falls back to whole-image rasterization, avoiding partially rendered images. Debug logs distinguish unsupported-feature fallback from explicitly requested rasterization.

New image controls

  • document.images.rasterize_svg forces SVG rasterization independently of image optimization. Defaults to false.
  • document.images.raster_format: auto | jpeg controls raster encoding. Defaults to auto, preserving normal format-specific behavior.
  • jpeg converts decodable raster images and rasterized SVG results to JPEG, using jpeg_quality_level and flattening transparency onto white.
  • Selecting JPEG alone does not disable native vectors. Combine it with rasterize_svg: true to request JPEG for source SVG artwork too.
  • For Kobo output, explicit JPEG encoding takes precedence over WebP-to-PNG conversion.

Improvements: Transparency and compatibility

  • SVG-to-PNG rasterization preserves transparency for EPUB, Kobo, and external Markdown unless remove_transparency is enabled.
  • JPEG output, Kindle raster images, and PDF raster embedding remain white-backed.
  • Encoding changes preserve existing cover/body sizing, aspect-ratio policies, and PDF layout behavior.

Documentation and reliability

  • Added a comprehensive Image Handling guide (docs/images.md) covering format capabilities, configuration interactions, covers, vignettes, sizing, troubleshooting, and practical examples.
  • Expanded regression coverage for vector rendering, raster fallback, transparency, encoding, and layout preservation. Verified cross-format output and unchanged PDF page rendering.

Full Changelog: v1.9.1...v1.9.2

Don't miss a new fb2cng release

NewReleases is sending notifications on new releases.