Skip to content

Commit

Permalink
Improve best-filter-per-line heuristic used in filter mode 5
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
Joshua Holmer committed Mar 10, 2016
1 parent 3f42eae commit f1e6506
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 232 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**Version 0.2.1**
- Add rustdoc for public methods and structs
- Improve filter mode 5 heuristic ([#16](https://github.com/shssoichiro/oxipng/issues/16))

**Version 0.2.0**
- Fix program version that is displayed when running `oxipng -V`
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ pub fn optimize(filepath: &Path, opts: &Options) -> Result<(), String> {
const PRESERVED_HEADERS: [&'static str; 9] = ["cHRM", "gAMA", "iCCP", "sBIT", "sRGB",
"bKGD", "hIST", "pHYs", "sPLT"];
let mut preserved = HashMap::new();
for (hdr, contents) in png.aux_headers.iter() {
for (hdr, contents) in &png.aux_headers {
if PRESERVED_HEADERS.contains(&hdr.as_ref()) {
preserved.insert(hdr.clone(), contents.clone());
}
Expand Down
Loading

0 comments on commit f1e6506

Please # to comment.