Lymphatus / libcaesium

The Caesium compression library written in Rust (with a C interface)
Apache License 2.0
128 stars 23 forks source link

File type conversion #23

Closed blopker closed 1 month ago

blopker commented 1 month ago

Hey! Thanks again for publishing the crate. I have another feature request though...

I was going to implement this in my app, but I wanted to see if it made sense to do here instead. Basically, I'm finding my workflow always includes taking a jpeg or png, then using something like Photoshop to convert it into webp, then running it through libcaesium.

I'm wondering if libcaesium should do file type conversions? This would eliminate a common manual step. The flow I'm looking for is: Any file type -> to webp -> optimize. Thoughts?

Lymphatus commented 1 month ago

You can already do it: https://docs.rs/libcaesium/0.17.0/caesium/fn.convert.html It does basically what you are saying: convert to best possible quality to another format and then apply the compression based on selected parameters.

blopker commented 1 month ago

Ah, I missed that! Thank you :)