Skip to content

Commit

Permalink
Add test for failing edge-case images with subtitles
Browse files Browse the repository at this point in the history
Closes #29
  • Loading branch information
Joshua Holmer committed Mar 10, 2016
1 parent f1e6506 commit fb01950
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
Binary file added tests/files/issue-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions tests/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit fb01950

Please sign in to comment.