Swap OptiPNG with OxiPNG

This makes building simpler and allows us to potentially use multithreading version in the future.

For now points to a custom fork of OxiPNG that enables WebAssembly support, as PR is still pending review.
This commit is contained in:
Ingvar Stepanyan
2019-08-01 17:01:25 +01:00
committed by Ingvar Stepanyan
parent 4621cbcae9
commit 629d64326d
34 changed files with 788 additions and 989 deletions

7
codecs/oxipng/src/lib.rs Normal file
View File

@@ -0,0 +1,7 @@
use wasm_bindgen::prelude::*;
#[wasm_bindgen(catch)]
pub fn optimise(data: &[u8], level: u8) -> Vec<u8> {
let options = oxipng::Options::from_preset(level);
oxipng::optimize_from_memory(data, &options).unwrap_throw()
}