rgb16_to_gb16

Function rgb16_to_gb16 

Source
pub fn rgb16_to_gb16(
    image: &mut YuvPlanarImageMut<'_, u16>,
    rgb16: &[u16],
    rgb16_stride: u32,
    range: YuvRange,
) -> Result<(), YuvError>
Expand description

Convert RGB16 to GB16

This function takes RGB image format data with 16-bit precision, and converts it to GB16 YUV format.

§Arguments

  • image - Target GB16 image.
  • rgb - A slice to load RGB16 data.
  • rgb_stride - The stride (components per row) for the RGB16 plane.
  • range - Yuv values range.

§Panics

This function panics if the lengths of the planes or the input RGB16 data are not valid based on the specified width, height, and strides is provided.