libqoi 0.3.2

A basic QOI encoder/decoder in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
use libqoi::decode_qoi;
use std::io::Read;
use std::fs;

fn main() {
    let mut file: Vec<u8> = vec![];
    fs::File::open("kodim10.qoi").unwrap().read_to_end(&mut file).unwrap();
    let (header, img, _) = decode_qoi(&file).expect("Test File is invalid");
    println!("File is {} by {}", header.height, header.width);
    println!("Raw RGBA data is {} bytes", img.len());
}