[−][src]Function lodepng::decode_memory
pub fn decode_memory<Bytes: AsRef<[u8]>>(
input: Bytes,
colortype: ColorType,
bitdepth: c_uint
) -> Result<Image, Error>
Converts PNG data in memory to raw pixel data.
decode32
and decode24
are more convenient if you want specific image format.
See State::decode()
for advanced decoding.
in
: Memory buffer with the PNG file.colortype
: the desired color type for the raw output image. SeeColorType
.bitdepth
: the desired bit depth for the raw output image. 1, 2, 4, 8 or 16. Typically 8.