New transformations #652
aochagavia
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there! I am using libpng for decoding images in a Rust codebase and am considering switching to this crate. Some transformations I'm using are not provided by the
pngcrate at the moment, but I might be able to contribute with a PR if things are not too complex. Let's discuss possible implementation routes.For context, here is the relevant code that uses libpng:
It looks like the following transformations are alrady available:
png_set_expand->Transformations::EXPANDpng_set_add_alpha->Transformations::ALPHApng_set_scale_16->Transformations::STRIP_16(this is not an exact mapping, but the crate docs suggest the effect might be the same)This means the following transformations are missing:
png_set_packingpng_set_bgrpng_set_gammaFrom this list, the first two seem straightforward (though maybe there are surprises lurking for me, since I'm not too well versed in png processing). The gamma one seems a bit more complicated. I don't see how it can fit the current
Transformationsarchitecture, because it takes parameters. Do you have any suggestions on how to tackle it?By the way, if it's possible to implement these transformations outside of the library (i.e. in my own user code) without a performance impact, I'd be happy to try that too.
Beta Was this translation helpful? Give feedback.
All reactions