Struct lodepng::ffi::ColorProfile [] [src]

#[repr(C)]
pub struct ColorProfile { pub colored: c_uint, pub key: c_uint, pub key_r: u16, pub key_g: u16, pub key_b: u16, pub alpha: c_uint, pub numcolors: c_uint, pub palette: [RGBA; 256], pub bits: c_uint, }

Gives characteristics about the colors of the image, which helps decide which color model to use for encoding. Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.

Fields

not greyscale

image is not opaque and color key is possible instead of full alpha

key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255

image is not opaque and alpha channel or alpha palette required

amount of colors, up to 257. Not valid if bits == 16.

Remembers up to the first 256 RGBA colors, in no particular order

bits per channel (not for palette). 1,2 or 4 for greyscale only. 16 if 16-bit per channel required.

Methods

impl ColorProfile
[src]

[src]