extern crate lodepng;
use std::path::Path;
fn main() {
let path = &Path::new("write_test.png");
let image = [255u8, 0, 0, 0, 255, 0,
0, 0, 255, 0, 99, 99];
if let Err(e) = lodepng::encode_file(path, &image, 2, 2, lodepng::ColorType::RGB, 8) {
panic!("failed to write png: {:?}", e);
}
println!("Written to {}", path.display());
}