pub fn valid_depth(&self, bit_depth: u8) -> bool {
        match self {
            NoImage => bit_depth == 0,
            ColorMappedImage | TrueColorImage |
            RleColorMappedImage |
            RleTrueColorImage => match bit_depth {
                16 | 24 | 32 => true,
                _ => false
            }
            BlackAndWhiteImage | RleBlackAndWhiteImage => bit_depth == 8
        }
    }
/// Returns true if `bit_depth` is a valid bit depth for the image type.
Returns true if `bit_depth` is a valid bit depth for the image type.
Returns true if ` bit_depth ` is a valid bit depth for the image type .
pub fn valid_depth(&self, bit_depth: u8) -> bool {
        match self {
            NoImage => bit_depth == 0,
            ColorMappedImage | TrueColorImage |
            RleColorMappedImage |
            RleTrueColorImage => match bit_depth {
                16 | 24 | 32 => true,
                _ => false
            }
            BlackAndWhiteImage | RleBlackAndWhiteImage => bit_depth == 8
        }
    }
pub fn valid_depth ( & self , bit_depth : u8 ) -> bool { match self { NoImage => bit_depth == 0 , ColorMappedImage | TrueColorImage | RleColorMappedImage | RleTrueColorImage => match bit_depth { 16 | 24 | 32 => true , _ => false } BlackAndWhiteImage | RleBlackAndWhiteImage => bit_depth == 8 } }
Returns true if `bit_depth` is a valid bit depth for the image type.
Returns true if ` bit_depth ` is a valid bit depth for the image type .
&self
bit_depth
u8
&self
bit_depth
u8