fn gray_to_rgb(gray: &[u8]) -> Box<[u8]> {
    let num_pixels = gray.len();
    let mut rgb = Vec::with_capacity(num_pixels * 3);
    for &value in gray {
        rgb.push(value);
        rgb.push(value);
        rgb.push(value);
    }
    rgb.into_boxed_slice()
}
/// Converts grayscale image data into RGB.
Converts grayscale image data into RGB.
Converts grayscale image data into RGB .
fn gray_to_rgb(gray: &[u8]) -> Box<[u8]> {
    let num_pixels = gray.len();
    let mut rgb = Vec::with_capacity(num_pixels * 3);
    for &value in gray {
        rgb.push(value);
        rgb.push(value);
        rgb.push(value);
    }
    rgb.into_boxed_slice()
}
fn gray_to_rgb ( gray : & [ u8 ] ) -> Box < [ u8 ] > { let num_pixels = gray . len ( ) ; let mut rgb = Vec :: with_capacity ( num_pixels * 3 ) ; for & value in gray { rgb . push ( value ) ; rgb . push ( value ) ; rgb . push ( value ) ; } rgb . into_boxed_slice ( ) }
Converts grayscale image data into RGB.
Converts grayscale image data into RGB .
gray
&[u8]
gray
&[u8]