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