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]
impl ColorType
pub fn to_color_mode(&self, bitdepth: c_uint) -> ColorMode
[src]
pub fn to_color_mode(&self, bitdepth: c_uint) -> ColorMode
Create color mode with given type and bitdepth
pub fn channels(&self) -> u8
[src]
pub fn channels(&self) -> u8
channels * bytes per channel = bytes per pixel
Trait Implementations
impl Copy for ColorType
[src]
impl Copy for ColorType
impl Clone for ColorType
[src]
impl Clone for ColorType
fn clone(&self) -> ColorType
[src]
fn clone(&self) -> ColorType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for ColorType
[src]
impl Debug for ColorType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for ColorType
[src]
impl Eq for ColorType
impl PartialEq for ColorType
[src]
impl PartialEq for ColorType