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:
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.