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

Function histogram

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

Source from the content-addressed store, hash-verified

7
8#[bench]
9fn histogram(b: &mut Bencher) {
10 let img = lodepng::decode32_file("/Users/kornel/Desktop/canvas.png").unwrap();
11 let liq = Attributes::new();
12 b.iter(move || {
13 let mut img = liq.new_image(&*img.buffer, img.width, img.height, 0.).unwrap();
14 let mut hist = Histogram::new(&liq);
15 hist.add_image(&liq, &mut img).unwrap();
16 });
17}
18
19#[bench]
20fn remap_ord(b: &mut Bencher) {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
new_imageMethod · 0.80
add_imageMethod · 0.80

Tested by

no test coverage detected