Expand description
§lunar-png
A simple png decoding and encoding library
§Crate Features
The crate is split into 2 features:
- Encoding
- Decoding
§Usage
use std::io::Read;
use lunar_png::*;
let mut file = std::fs::File::open("something.png").unwrap();
let mut data = Vec::new();
file.read_to_end(&mut data);
//Decode a png image
let image = decode_png(&mut data.into_iter()).unwrap();
//Re-encode that image
let png = encode_png(&image, &PngEncodingOptions::default());Structs§
- Image
- A loaded png image
- PngEncoding
Options - Settings for png encoding
Enums§
- Compression
Level - Compression level of the encoded image
- Error
- Errors that can occur while loading an image
- Image
Type - Image type of a loaded image
Functions§
- decode_
png - Parses a png image from a given stream
- encode_
png - Encodes a png into a byte stream