Neopallium / jpeg2k

Safe wrapper for openjpeg-sys.
MIT License
6 stars 7 forks source link

"image" crate pulled in with all features. #4

Closed John-Nagle closed 1 year ago

John-Nagle commented 1 year ago

Minor issue, low priority.

In order to get an image out of jpeg2k, it's necessary to do

let img: DynamicImage = jp2_image.try_into()?; That requires the "image" feature to be enabled. jpeg2k is just implementing the DynamicImage trait; it doesn't need any of the codecs in the "image" crate. But the "image" feature brings in "image" with default options. This pulls in every codec known to "image", because "image" recognizes files by suffix by default. That in turn pulls in the "rayon" threading system. I'm trying to keep "rayon" out, because I have my own thread pool.

In the Cargo.toml file, "image" is pulled in by

image = { version = "0.23", optional = true } Could that be changed to:

image = { version = "^0.23", default_features = false, optional = true }

Thanks.

Neopallium commented 1 year ago

Done and published as 0.6.6