From 9d036bc64eb02ed2741218076280e2c11c3d6807 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Mon, 3 Jan 2022 00:47:23 +0300 Subject: [PATCH] Update tests and benches to the new encoder API --- qoi-bench/src/main.rs | 2 +- tests/test_ref.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qoi-bench/src/main.rs b/qoi-bench/src/main.rs index 57c0f7a..9462463 100644 --- a/qoi-bench/src/main.rs +++ b/qoi-bench/src/main.rs @@ -123,7 +123,7 @@ impl Codec for CodecQoiFast { } fn encode(img: &Image) -> Result> { - Ok(qoi_fast::qoi_encode_to_vec(&img.data, img.width, img.height, img.channels, 0)?) + Ok(qoi_fast::qoi_encode_to_vec(&img.data, img.width, img.height)?) } fn decode(data: &[u8], _img: &Image) -> Result> { diff --git a/tests/test_ref.rs b/tests/test_ref.rs index a908dff..e35eb28 100644 --- a/tests/test_ref.rs +++ b/tests/test_ref.rs @@ -95,7 +95,7 @@ fn test_reference_images() -> Result<()> { let png_name = png_path.file_name().unwrap_or_default().to_string_lossy(); let img = Image::from_png(png_path)?; println!("{} {} {} {}", png_name, img.width, img.height, img.channels); - let encoded = qoi_encode_to_vec(&img.data, img.width, img.height, img.channels, 0)?; + let encoded = qoi_encode_to_vec(&img.data, img.width, img.height)?; let expected = fs::read(qoi_path)?; compare_slices(&png_name, "encoding", &encoded, &expected)?; let (_header, decoded) = qoi_decode_to_vec(&expected)?;