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

Function quantize_s1

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

Source from the content-addressed store, hash-verified

65
66#[bench]
67fn quantize_s1(b: &mut Bencher) {
68 let img = lodepng::decode32_file("/Users/kornel/Desktop/canvas.png").unwrap();
69 let mut liq = Attributes::new();
70 liq.set_speed(1).unwrap();
71 b.iter(move || {
72 let mut img = liq.new_image(&*img.buffer, img.width, img.height, 0.).unwrap();
73 liq.quantize(&mut img).unwrap();
74 });
75}

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