mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-17 20:59:43 +02:00
* Lossy WebP: a pure-Rust VP8 encoder with quality and lossless controls (#648) crates/codecs gains codecs/vp8: a clean-room VP8 key-frame encoder from RFC 6386 (boolean coder, 16x16 and 4x4 intra prediction with per-macroblock mode decision, forward DCT/WHT paired with the bit-exact inverse transforms, dc/ac quantiser tables, token coding with per-frame probability updates, skipped macroblocks). webp.rs wraps the frame in the RIFF container (bare VP8, or VP8X with ALPH alpha and ICCP/EXIF/XMP). EncodeOptions: webp_lossless now picks the encoder instead of erroring, webp_quality (0-100) sets the quantiser; a lossy WebP reports a LossyCompression fidelity warning. Export As: the WebP entry gets Quality and a Lossless switch (new tl! string in all catalogs). CLI --quality, MCP/RPC doc_save quality and the engine's JPEG-style quality turn a WebP lossy; without a quality WebP stays lossless as before. Tests: tests/webp_lossy.rs decodes every file with image-webp (PSNR by quality, sizes fall with quality and are >= 4x below lossless on noisy photos, flat frames under 1.2 KB, alpha exact, metadata round trip, odd/tiny sizes, 16-bit input, the 16383 px limit as an error, text edges), plus unit tests for the coder, transforms, prediction and header. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com> * i18n(it): Lossless (Export As WebP switch) in the Italian catalog that landed on main Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com> --------- Co-authored-by: leon <claude.udder842@passmail.net> Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|---|---|---|
| .. | ||
| photocraft | ||
| photocraft-cli | ||
| photocraft-web | ||