Closed theduke closed 1 year ago
There's no equivalent to jpegtran.
jpegtran uses a different private API. See source of jpegtran.c and copy what it does.
I've added jpegtran
feature to mozjpeg-sys
to build those extra APIs. I don't have safe wrapper for them (yet?)
I want to optionally embed mozjpeg as an alternative to calling out to
jpegtran
.It would be great to have an example for doing the equivalent of
jpegtran -optimize
with code.I assume I have to first decompress, then compress with
Compress::set_optimize_scans(true)
, but it would be great to get some confirmation from someone familiar with the library.