(b: &mut Bencher)
| 65 | |
| 66 | #[bench] |
| 67 | fn 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 | } |