/// Returns the number of bits needed to store a single pixel in this
/// format.
Returns the number of bits needed to store a single pixel in this
format.
Returns the number of bits needed to store a single pixel in this format .
pub fn bits_per_pixel(self) -> u32 {
        match self {
            PixelFormat::RGBA => 32,
            PixelFormat::RGB => 24,
            PixelFormat::GrayAlpha => 16,
            PixelFormat::Gray => 8,
            PixelFormat::Alpha => 8,
        }
    }
pub fn bits_per_pixel ( self ) -> u32 { match self { PixelFormat :: RGBA => 32 , PixelFormat :: RGB => 24 , PixelFormat :: GrayAlpha => 16 , PixelFormat :: Gray => 8 , PixelFormat :: Alpha => 8 , } }
Returns the number of bits needed to store a single pixel in this
format.
Returns the number of bits needed to store a single pixel in this format .
self