ImageOptim / mozjpeg-rust

Safe Rust wrapper for the MozJPEG library
https://lib.rs/mozjpeg
Other
75 stars 19 forks source link

Add set_smoothing_factor fn #23

Closed yanorei32 closed 3 years ago

yanorei32 commented 3 years ago

I added the Compress::set_smoothing_factor function for MozJPEG's smooth function.

MozJPEG's argument reference: https://github.com/mozilla/mozjpeg/blob/5552483db96d9c5c18ae60a7e3bff2be99d78247/usage.txt#L213-L215

MozJPEG's argument parser: https://github.com/mozilla/mozjpeg/blob/afdcab16c5d706e55af50c93c09f6be7b4ca9288/cjpeg.c#L579-L589

kornelski commented 3 years ago

Thanks. Could you use a Rust type for it, e.g u8 or u32?

yanorei32 commented 3 years ago

I've fixed it. Could you review it?

p.s. I'm sad that force-pushed to fix the commit message is shown.

kornelski commented 3 years ago

Thanks