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
Methods
impl ColorType
[src]
fn to_color_mode(&self, bitdepth: c_uint) -> ColorMode
[src]
Create color mode with given type and bitdepth
fn channels(&self) -> u8
[src]
channels * bytes per channel = bytes per pixel
Trait Implementations
impl Copy for ColorType
[src]
impl Clone for ColorType
[src]
fn clone(&self) -> ColorType
[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