Enum repng::ColorFormat
[−]
[src]
#[repr(u8)]pub enum ColorFormat { Gray, RGB, Palette, GrayA, RGBA, }
A color format, which specifies how the bytes represent the pixels.
Variants
Gray
A format encoding only the luminosity of each pixel.
Valid bit depths are 1, 2, 4, 8 and 16 bits.
RGB
A format encoding the red, green, then blue components of each pixel.
Valid bit depths are 8 and 16 bits.
Palette
A single-channel format encoding the index of each pixel in a palette.
If you use this format, you probably want to also use meta::palette
or meta::palette_alpha
before writing any image data, because
otherwise, the decoder probably won't know what each index represents.
Valid bit depths are 1, 2, 4 and 8 bits.
GrayA
The same as Gray, but with an alpha channel added to the end.
Valid bit depths are 8 and 16 bits.
RGBA
The same as RGB, but with an alpha channel added to the end.
Valid bit depths are 8 and 16 bits.
Methods
impl ColorFormat
[src]
Trait Implementations
impl Clone for ColorFormat
[src]
fn clone(&self) -> ColorFormat
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for ColorFormat
[src]
impl Eq for ColorFormat
[src]
impl PartialEq for ColorFormat
[src]
fn eq(&self, __arg_0: &ColorFormat) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Hash for ColorFormat
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more