Enum ColorType
enum ColorType
An enumeration over supported color types and bit depths
Variants
-
L8 Pixel is 8-bit luminance
-
La8 Pixel is 8-bit luminance with an alpha channel
-
Rgb8 Pixel contains 8-bit R, G and B channels
-
Rgba8 Pixel is 8-bit RGB with an alpha channel
-
L16 Pixel is 16-bit luminance
-
La16 Pixel is 16-bit luminance with an alpha channel
-
Rgb16 Pixel is 16-bit RGB
-
Rgba16 Pixel is 16-bit RGBA
-
Rgb32F Pixel is 32-bit float RGB
-
Rgba32F Pixel is 32-bit float RGBA
Implementations
impl ColorType
fn bytes_per_pixel(self: Self) -> u8Returns the number of bytes contained in a pixel of
ColorTypecfn has_alpha(self: Self) -> boolReturns if there is an alpha channel.
fn has_color(self: Self) -> boolReturns false if the color scheme is grayscale, true otherwise.
fn bits_per_pixel(self: Self) -> u16Returns the number of bits contained in a pixel of
ColorTypec(which will always be a multiple of 8).fn channel_count(self: Self) -> u8Returns the number of color channels that make up this pixel
impl Clone for ColorType
fn clone(self: &Self) -> ColorType
impl Copy for ColorType
impl Debug for ColorType
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for ColorType
impl Freeze for ColorType
impl Hash for ColorType
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for ColorType
fn eq(self: &Self, other: &ColorType) -> bool
impl RefUnwindSafe for ColorType
impl Send for ColorType
impl StructuralPartialEq for ColorType
impl Sync for ColorType
impl Unpin for ColorType
impl UnsafeUnpin for ColorType
impl UnwindSafe for ColorType
impl<T> Any for ColorType
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for ColorType
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for ColorType
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for ColorType
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for ColorType
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for ColorType
unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> ToOwned for ColorType
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for ColorType
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for ColorType
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for ColorType
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>