Enum image::ColorType [−][src]
pub enum ColorType {
L8,
La8,
Rgb8,
Rgba8,
L16,
La16,
Rgb16,
Rgba16,
Bgr8,
Bgra8,
// some variants omitted
}An enumeration over supported color types and bit depths
Variants
Pixel is 8-bit luminance
Pixel is 8-bit luminance with an alpha channel
Pixel contains 8-bit R, G and B channels
Pixel is 8-bit RGB with an alpha channel
Pixel is 16-bit luminance
Pixel is 16-bit luminance with an alpha channel
Pixel is 16-bit RGB
Pixel is 16-bit RGBA
Pixel contains 8-bit B, G and R channels
Pixel is 8-bit BGR with an alpha channel
Implementations
impl ColorType[src]
impl ColorType[src]pub fn bytes_per_pixel(self) -> u8[src]
Returns the number of bytes contained in a pixel of ColorType c
pub fn has_alpha(self) -> bool[src]
Returns if there is an alpha channel.
pub fn has_color(self) -> bool[src]
Returns false if the color scheme is grayscale, true otherwise.
pub fn bits_per_pixel(self) -> u16[src]
Returns the number of bits contained in a pixel of ColorType c (which will always be
a multiple of 8).
pub fn channel_count(self) -> u8[src]
Returns the number of color channels that make up this pixel