Struct lodepng::ffi::State [] [src]

#[repr(C)]
pub struct State { pub decoder: DecoderSettings, pub encoder: EncoderSettings, pub info_raw: ColorMode, pub info_png: Info, pub error: Error, }

The settings, state and information for extended encoding and decoding

Fields

specifies the format in which you would like to get the raw pixel buffer

info of the PNG image obtained after decoding

Methods

impl State
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

whether to convert the PNG to the color type you want. Default: yes

[src]

if false but remember_unknown_chunks is true, they're stored in the unknown chunks.

[src]

store all bytes from unknown chunks in the Info (off by default, useful for a png editor)

[src]

Decompress ICC profile from iCCP chunk

[src]

Load PNG from buffer using State's settings


 state.info_raw_mut().colortype = ColorType::RGBA;
 match state.decode(&slice) {
     Ok(Image::RGBA(with_alpha)) => do_stuff(with_alpha),
     _ => panic!("¯\\_(ツ)_/¯")
 }

[src]

[src]

Returns (width, height)

[src]

[src]

Trait Implementations

impl Clone for State
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for State
[src]

[src]

Returns the "default value" for a type. Read more