Struct lodepng::State
[−]
[src]
pub struct State {
// some fields omitted
}Methods
impl State
fn new() -> State
fn info_raw(&mut self) -> &mut ColorMode
fn info_png(&mut self) -> &mut Info
fn decode(&mut self, input: &[u8]) -> Result<Image, Error>
Load PNG from buffer using State's settings
state.info_raw().colortype = LCT_RGBA; match state.decode(&slice) { Ok(Image::RGBA(with_alpha)) => do_stuff(with_alpha), _ => panic!("¯\\_(ツ)_/¯") }
fn inspect(&mut self, input: &[u8]) -> Result<(usize, usize), Error>
Returns (width, height)