Function colorutils_rs::bgr_to_oklab

source ·
pub fn bgr_to_oklab(
    src: &[u8],
    src_stride: u32,
    dst: &mut [f32],
    dst_stride: u32,
    width: u32,
    height: u32,
    transfer_function: TransferFunction,
)
Expand description

This function converts BGR to Oklab against D65 white point. This is much more effective than naive direct transformation

§Arguments

  • src - A slice contains BGR data
  • src_stride - Bytes per row for src data.
  • width - Image width
  • height - Image height
  • dst - A mutable slice to receive LAB(a) data
  • dst_stride - Bytes per row for dst data
  • transfer_function - transfer function to linear colorspace