siiptuo / pio

Optimize images while maintaining the same perceived quality
138 stars 10 forks source link

Feature request: Make available as crate / library? #29

Open BezPowell opened 9 months ago

BezPowell commented 9 months ago

This is more a question than a true feature request, but the issues seemed the only place to ask it. Pio is a really useful stand-alone utility, but I have on a few occasions wanted to use it within other rust applications as the processing step for images. Zola (or other static site generators) in particular springs to mind, but many other projects would likely benefit from being able to encode images as small as possible, while still retaining quality.

Is there any possibility in the future of making pio's functionality available as part of a crate? Something with a limited api that would allow calling it within other rust code. E.g. something along the lines of pio(format: Jpeg, quality: 80) perhaps?