rgb12_to_gb12

Function rgb12_to_gb12 

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

Convert RGB12 to GB12

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

§Arguments

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

§Panics

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