Closed Riolku closed 7 months ago
I really like this, but I don't know how to do this!
For now I have changed it to image = { version = "0.24.5", default-features = false, features = ["gif", "jpeg", "png", "webp", "pnm", "tga", "tiff", "bmp"] }
which seems to reduce the deps a tiny bit, at least.
Can't you use no features, along with default features off?
I can test stuff and file a PR in a few hours, if you like.
I tried with no features, but then it panics when opening any image :laughing:
So you need to include the formats you want to support. I just don't know how to "delegate" this to the consumer.
What if ratatui had a feature that was on by default that enabled all the default features of image, but if you turn that feature off, you could control the formats manually? We would need a section in the README about this.
I'm all for this, but I really don't know how to let the user of this crate specify the features of a dependency. But it sounds like something common that should have a solution.
I'll look into it later and let you know how it goes - thanks for looking into it!
I believe that feature unification means that depending on no features of image
will let API users specify features by adding their own image
dependency.
As of right now, ratatui_image uses the default features for
image
. This is a good default, but it would be nice to be able to disable certain formats. Specifically, I don't care about OpenEXR, but it eats up a lot of my dependency tree.Any thoughts on an easy way to do this? Realistically,
ratatui_image
only cares thatimage
exists, not what features are enabled, right? Could we just enable none of them, and have users addimage
as a dependency with the extra features if they want the formats? Or is that bad UX?