Closed kolserdav closed 1 year ago
Eh, it would probably be more correct to split edits rustfmt
and transfer load_rgba
into separate commits. Or not use rustfmt
at all. Since a lot of edits can be misleading at first glance, in fact, it just moved load_rgba
and some dependencies. And rustfmt
made automatic edits when saving.
I deliberately don't use rustfmt in any of my projects. It has too many issues with inconsistent formatting and nonsensical choices of code layout to be applied unconditionally to everything. Please don't change the formatting.
However, ravif
is meant to be just a library for encoding with minimal dependencies (that's why it exists as a separate crate, not lib.rs in the cavif crate), so I'd rather not add dependencies on any codecs in ravif crate.
I think it's fine if you copy-paste image loading to your crate or use some other decoders.
In order to avoid duplicating the
load_rgba
method (as here for example: https://github.com/kolserdav/ravif-js/blob/master/src/lib.rs#L82) when usingravif
as a library, it is made public, exported fromravif
.