MCPcopy Create free account
hub / github.com/ImageOptim/libimagequant / quantize_s8

Function quantize_s8

benches/bench.rs:56–64  ·  view source on GitHub ↗
(b: &mut Bencher)

Source from the content-addressed store, hash-verified

54
55#[bench]
56fn quantize_s8(b: &mut Bencher) {
57 let img = lodepng::decode32_file("/Users/kornel/Desktop/canvas.png").unwrap();
58 let mut liq = Attributes::new();
59 liq.set_speed(8).unwrap();
60 b.iter(move || {
61 let mut img = liq.new_image(&*img.buffer, img.width, img.height, 0.).unwrap();
62 liq.quantize(&mut img).unwrap();
63 });
64}
65
66#[bench]
67fn quantize_s1(b: &mut Bencher) {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
set_speedMethod · 0.80
new_imageMethod · 0.80
quantizeMethod · 0.45

Tested by

no test coverage detected