fn gray_to_grayalpha(gray: &[u8]) -> Box<[u8]> {
    let num_pixels = gray.len();
    let mut grayalpha = Vec::with_capacity(num_pixels * 2);
    for &value in gray {
        grayalpha.push(value);
        grayalpha.push(std::u8::MAX);
    }
    grayalpha.into_boxed_slice()
}
/// Converts grayscale image data into grayscale-with-alpha.
Converts grayscale image data into grayscale-with-alpha.
Converts grayscale image data into grayscale - with - alpha .
fn gray_to_grayalpha(gray: &[u8]) -> Box<[u8]> {
    let num_pixels = gray.len();
    let mut grayalpha = Vec::with_capacity(num_pixels * 2);
    for &value in gray {
        grayalpha.push(value);
        grayalpha.push(std::u8::MAX);
    }
    grayalpha.into_boxed_slice()
}
fn gray_to_grayalpha ( gray : & [ u8 ] ) -> Box < [ u8 ] > { let num_pixels = gray . len ( ) ; let mut grayalpha = Vec :: with_capacity ( num_pixels * 2 ) ; for & value in gray { grayalpha . push ( value ) ; grayalpha . push ( std :: u8 :: MAX ) ; } grayalpha . into_boxed_slice ( ) }
Converts grayscale image data into grayscale-with-alpha.
Converts grayscale image data into grayscale - with - alpha .
gray
&[u8]
gray
&[u8]