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
// wrapping_sub is wanted. If num_planes is 0, this turns in a very big number that
// still represents an invalid number of planes.
let last_src_plane = src_format.num_planes.wrapping_sub(1);
if !pixel_format::is_compatible(src_pixel_format, width, height, last_src_plane) {
return Err(ErrorKind::InvalidValue);
}
when this check is removed everything seems to work. I'm not sure whether this is a fault of how image-rs supplies data, or of this crate, or something else, so opening a bug here as well.
See image-rs/image#1647 for discussion.
In summary, the caller api (image) is not respecting the current contract of the callee (dcv-color-primitives).
Proper solution is to have dcv color primitives handle color conversion removing the multiple of two restriction. #65
Basically opening an image like https://github.com/installgentoo/assorted_curiosities/blob/master/trash/test.avif leads to error on
See image-rs/image#1647 for the investigation on this.
The text was updated successfully, but these errors were encountered: