You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the API for encoding is kinda awkward in that we have a separate Filter and AdaptiveFilter enums that are separately applied to the encoder, and the API does not communicate that the Filter setting is ignored if AdaptiveFilter::Adaptive is also set.
By contrast, the image crate exposes the Filter as a single enum already which lists all the individual filters plus Filter::Adaptive, which I think makes for a much nicer API.
There may be cases where adaptive filtering is not an option (e.g. in decoding or in per-row APIs), in which case we can keep that as a RowFilter or some such and ideally make that enum private.
The text was updated successfully, but these errors were encountered:
I've been wanting to make this change. Would also be nice to make the enum non-exhaustive so other adaptive filter strategies could be added in the future.
Could you make the change is the same semver-breaking PR? That way we can look at the entire new API design in one place.
Right now the API for encoding is kinda awkward in that we have a separate
Filter
andAdaptiveFilter
enums that are separately applied to the encoder, and the API does not communicate that theFilter
setting is ignored ifAdaptiveFilter::Adaptive
is also set.By contrast, the
image
crate exposes theFilter
as a single enum already which lists all the individual filters plusFilter::Adaptive
, which I think makes for a much nicer API.There may be cases where adaptive filtering is not an option (e.g. in decoding or in per-row APIs), in which case we can keep that as a
RowFilter
or some such and ideally make that enum private.The text was updated successfully, but these errors were encountered: