Struct lodepng::ffi::DecoderSettings
[−]
[src]
pub struct DecoderSettings { pub ignore_crc: c_uint, pub fix_png: c_uint, pub color_convert: c_uint, // some fields omitted }
Settings for the decoder. This contains settings for the PNG and the Zlib decoder, but not the Info settings from the Info structs.
Fields
ignore_crc: c_uint
ignore CRC checksums
fix_png: c_uint
The fix_png setting, if 1, makes the decoder tolerant towards some PNG images that do not correctly follow the PNG specification. This only supports errors that are fixable, were found in images that are actually used on the web, and are silently tolerated by other decoders as well. Currently only one such fix is implemented: if a palette index is out of bounds given the palette size, interpret it as opaque black. By default this value is 0, which makes it stop with an error on such images.
color_convert: c_uint
whether to convert the PNG to the color type you want. Default: yes
Methods
impl DecoderSettings
[src]
fn new() -> DecoderSettings
Creates decoder settings initialized to defaults