pub(crate) fn channels(&self) -> u8 {
        match *self {
            ColorType::Grey | ColorType::Palette => 1,
            ColorType::GreyAlpha => 2,
            ColorType::Bgr | ColorType::Rgb => 3,
            ColorType::Bgra | ColorType::Bgrx | ColorType::Rgba => 4,
        }
    }
/// channels * bytes per channel = bytes per pixel
channels * bytes per channel = bytes per pixel
channels * bytes per channel = bytes per pixel
pub(crate) fn channels(&self) -> u8 {
        match *self {
            ColorType::Grey | ColorType::Palette => 1,
            ColorType::GreyAlpha => 2,
            ColorType::Bgr | ColorType::Rgb => 3,
            ColorType::Bgra | ColorType::Bgrx | ColorType::Rgba => 4,
        }
    }
pub ( crate ) fn channels ( & self ) -> u8 { match * self { ColorType :: Grey | ColorType :: Palette => 1 , ColorType :: GreyAlpha => 2 , ColorType :: Bgr | ColorType :: Rgb => 3 , ColorType :: Bgra | ColorType :: Bgrx | ColorType :: Rgba => 4 , } }
channels * bytes per channel = bytes per pixel
channels * bytes per channel = bytes per pixel
&self