Closed nikarh closed 5 months ago
Hi, this is a follow-up to https://github.com/kornelski/mozjpeg-sys/pull/37.
This provides a better API than potentially exposing corresponding cinfo fields. The structs are similar to the ones in the image crate (https://docs.rs/image/latest/image/codecs/jpeg/struct.PixelDensity.html).
cinfo
image
The getter is a bit questionable in the way it handles invalid density units, but I wasn't sure of the best approach here.
Hi, this is a follow-up to https://github.com/kornelski/mozjpeg-sys/pull/37.
This provides a better API than potentially exposing corresponding
cinfo
fields. The structs are similar to the ones in theimage
crate (https://docs.rs/image/latest/image/codecs/jpeg/struct.PixelDensity.html).The getter is a bit questionable in the way it handles invalid density units, but I wasn't sure of the best approach here.