Add test for failing edge-case images with subtitles

Closes #29
This commit is contained in:
Joshua Holmer 2016-03-10 14:49:00 -05:00
parent f1e65067f6
commit fb019505eb
3 changed files with 18 additions and 0 deletions

View file

@ -1,6 +1,7 @@
**Version 0.2.1**
- Add rustdoc for public methods and structs
- Improve filter mode 5 heuristic ([#16](https://github.com/shssoichiro/oxipng/issues/16))
- Add tests for edge-case images with subtitles ([#29](https://github.com/shssoichiro/oxipng/issues/29))
**Version 0.2.0**
- Fix program version that is displayed when running `oxipng -V`

BIN
tests/files/issue-29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

View file

@ -1209,3 +1209,20 @@ fn filter_5_for_palette_1() {
png::ColorType::Indexed,
png::BitDepth::One);
}
#[test]
fn issue_29() {
let input = PathBuf::from("tests/files/issue-29.png");
let mut opts = get_opts(&input);
opts.filter = HashSet::new();
opts.filter.insert(0);
let output = opts.out_file.clone();
test_it_converts(&input,
&output,
&opts,
png::ColorType::RGB,
png::BitDepth::Eight,
png::ColorType::RGB,
png::BitDepth::Eight);
}