shssoichiro / oxipng

Multithreaded PNG optimizer written in Rust
MIT License
2.95k stars 125 forks source link

[enhancement] TIFF-Support #643

Closed JoKalliauer closed 1 month ago

JoKalliauer commented 1 month ago

Is support of other formats, such as tiff, jpeg, webp desired/planed or out of scope?

ace-dent commented 1 month ago

My 2¢: The executable is already quite large. I'd prefer oxipng to remain very focussed as a command line tool, so suggest conversion is done with other utility programs.

AlexTMjugador commented 1 month ago

I'd say support for optimizing other image formats is clearly out of scope.

Support for reading other image formats and converting them to optimized PNGs could be more appropriate (see #480 for related discussion), but given the PNG format lossless nature and the ability to tune its filter selecting and Deflate encoding parameters for speed over compression size, it is practical to use alternative encoders for faster-than-usual PNG encoding, reducing the need for OxiPNG to support more input formats from a user perspective. Furthermore, Rust library and application developers can already use the internal raw image API to decode images from any format they prefer. Therefore, I agree with @ace-dent's perspective that it seems more sensible to keep OxiPNG focused on handling PNGs.

andrews05 commented 1 month ago

Indeed, since there is already an open issue for other input formats and other output formats is out of scope, I think we can safely close this issue.

TIFF: Maybe imagemagick? JPEG: jpeg-recompress, jpegli WebP: Unsure, probably tuning the parameters to cwebp is your best bet.