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]
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
Trait Implementations
impl Clone for ColorType
[src]
impl Copy for ColorType
[src]
impl Debug for ColorType
[src]
impl Eq for ColorType
[src]
impl From<ColorType> for ExtendedColorType
[src]
impl Hash for ColorType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ColorType> for ColorType
[src]
impl StructuralEq for ColorType
[src]
impl StructuralPartialEq for ColorType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ColorType
impl Send for ColorType
impl Sync for ColorType
impl Unpin for ColorType
impl UnwindSafe for ColorType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,