Enum lodepng::ffi::ColorType[][src]

#[repr(C)]pub enum ColorType {
    GREY,
    RGB,
    PALETTE,
    GREY_ALPHA,
    RGBA,
    BGRA,
    BGR,
    BGRX,
}

Type for decode, encode, etc. Same as standard PNG color types.

Variants

GREY

greyscale: 1, 2, 4, 8, 16 bit

RGB

RGB: 8, 16 bit

PALETTE

palette: 1, 2, 4, 8 bit

GREY_ALPHA

greyscale with alpha: 8, 16 bit

RGBA

RGB with alpha: 8, 16 bit

BGRA

Not PNG standard, for internal use only. BGRA with alpha, 8 bit

BGR

Not PNG standard, for internal use only. BGR no alpha, 8 bit

BGRX

Not PNG standard, for internal use only. BGR no alpha, padded, 8 bit

Implementations

impl ColorType[src]

pub fn to_color_mode(&self, bitdepth: c_uint) -> ColorMode[src]

Create color mode with given type and bitdepth

pub fn channels(&self) -> u8[src]

channels * bytes per channel = bytes per pixel

Trait Implementations

impl Clone for ColorType[src]

impl Copy for ColorType[src]

impl Debug for ColorType[src]

impl Eq for ColorType[src]

impl PartialEq<ColorType> for ColorType[src]

impl StructuralEq for ColorType[src]

impl StructuralPartialEq for ColorType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.