aws / dcv-color-primitives

DCV Color Primitives Library
MIT No Attribution
30 stars 22 forks source link

Doesn't support imagemagick-created avifs apparently #62

Closed installgentoo closed 2 years ago

installgentoo commented 2 years ago

Basically opening an image like https://github.com/installgentoo/assorted_curiosities/blob/master/trash/test.avif leads to error on

    // 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);
    }

See https://github.com/image-rs/image/issues/1647 for the investigation on this.

fabiosky commented 2 years ago

See https://github.com/image-rs/image/issues/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. https://github.com/aws/dcv-color-primitives/issues/65

fabiosky commented 2 years ago

Closed in favor of https://github.com/aws/dcv-color-primitives/issues/65