Alpha to trns tests
This commit is contained in:
parent
0a1f737533
commit
b176e5cd91
5 changed files with 48 additions and 0 deletions
BIN
tests/files/grayscale_alpha_16_should_be_grayscale_trns_16.png
Normal file
BIN
tests/files/grayscale_alpha_16_should_be_grayscale_trns_16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 247 KiB |
BIN
tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png
Normal file
BIN
tests/files/grayscale_alpha_8_should_be_grayscale_trns_8.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
BIN
tests/files/rgba_16_should_be_rgb_trns_16.png
Normal file
BIN
tests/files/rgba_16_should_be_rgb_trns_16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
BIN
tests/files/rgba_8_should_be_rgb_trns_8.png
Normal file
BIN
tests/files/rgba_8_should_be_rgb_trns_8.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue