diff --git a/tests/files/grayscale_alpha_16_should_be_grayscale_trns_16.png b/tests/files/grayscale_alpha_16_should_be_grayscale_trns_16.png new file mode 100644 index 00000000..0ef1ada1 Binary files /dev/null and b/tests/files/grayscale_alpha_16_should_be_grayscale_trns_16.png differ diff --git a/tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png b/tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png new file mode 100644 index 00000000..a339411d Binary files /dev/null and b/tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png differ diff --git a/tests/files/rgba_16_should_be_rgb_trns_16.png b/tests/files/rgba_16_should_be_rgb_trns_16.png new file mode 100644 index 00000000..5174bd31 Binary files /dev/null and b/tests/files/rgba_16_should_be_rgb_trns_16.png differ diff --git a/tests/files/rgba_8_should_be_rgb_trns_8.png b/tests/files/rgba_8_should_be_rgb_trns_8.png new file mode 100644 index 00000000..783ccf29 Binary files /dev/null and b/tests/files/rgba_8_should_be_rgb_trns_8.png differ diff --git a/tests/reduction.rs b/tests/reduction.rs index 6f34942e..e6ec5a2a 100644 --- a/tests/reduction.rs +++ b/tests/reduction.rs @@ -130,6 +130,30 @@ fn rgba_8_should_be_rgb_8() { ); } +#[test] +fn rgba_16_should_be_rgb_trns_16() { + test_it_converts( + "tests/files/rgba_16_should_be_rgb_trns_16.png", + true, + ColorType::RGBA, + BitDepth::Sixteen, + ColorType::RGB, + BitDepth::Sixteen, + ); +} + +#[test] +fn rgba_8_should_be_rgb_trns_8() { + test_it_converts( + "tests/files/rgba_8_should_be_rgb_trns_8.png", + true, + ColorType::RGBA, + BitDepth::Eight, + ColorType::RGB, + BitDepth::Eight, + ); +} + #[test] fn rgba_16_should_be_palette_8() { test_it_converts( @@ -694,6 +718,30 @@ fn grayscale_8_should_be_grayscale_8() { ); } +#[test] +fn grayscale_alpha_16_should_be_grayscale_trns_16() { + test_it_converts( + "tests/files/grayscale_alpha_16_should_be_grayscale_trns_16.png", + true, + ColorType::GrayscaleAlpha, + BitDepth::Sixteen, + ColorType::Grayscale, + BitDepth::Sixteen, + ); +} + +#[test] +fn grayscale_alpha_8_should_be_grayscale_trns_8() { + test_it_converts( + "tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png", + true, + ColorType::GrayscaleAlpha, + BitDepth::Eight, + ColorType::Grayscale, + BitDepth::Eight, + ); +} + #[test] fn small_files() { let input = PathBuf::from("tests/files/small_files.png");