Merge branch 'master' into enable-lto-release
This commit is contained in:
commit
f9cb0e0b00
5 changed files with 22 additions and 10 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
|
@ -1,3 +1,5 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
name = "adler32"
|
||||
version = "1.0.3"
|
||||
|
|
@ -149,8 +151,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "image"
|
||||
version = "0.21.0"
|
||||
source = "git+https://github.com/PistonDevelopers/image?rev=41dfbae#41dfbaecfa0e702eaef61e4dba156e9be5b2f70d"
|
||||
version = "0.21.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -257,7 +259,7 @@ dependencies = [
|
|||
"clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cloudflare-zlib 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.21.0 (git+https://github.com/PistonDevelopers/image?rev=41dfbae)",
|
||||
"image 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
@ -419,7 +421,7 @@ dependencies = [
|
|||
"checksum deflate 0.7.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8a6abb26e16e8d419b5c78662aa9f82857c2386a073da266840e474d5055ec86"
|
||||
"checksum either 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c67353c641dc847124ea1902d69bd753dee9bb3beff9aa3662ecf86c971d1fac"
|
||||
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
||||
"checksum image 0.21.0 (git+https://github.com/PistonDevelopers/image?rev=41dfbae)" = "<none>"
|
||||
"checksum image 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "99198e595d012efccf12abf4abc08da2d97be0b0355a2b08d101347527476ba4"
|
||||
"checksum inflate 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff"
|
||||
"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
|
||||
"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
|
||||
|
|
|
|||
|
|
@ -55,11 +55,7 @@ cloudflare-zlib = "^0.2.2"
|
|||
[dependencies.image]
|
||||
default-features = false
|
||||
features = ["png_codec"]
|
||||
#FIXME: Use upstream version when 0.22 is released
|
||||
#Contains bugfix for issues 167 and 168
|
||||
#version = "^0.21.0"
|
||||
git = "https://github.com/PistonDevelopers/image"
|
||||
rev = "41dfbae"
|
||||
version = "^0.21.2"
|
||||
|
||||
[features]
|
||||
binary = [
|
||||
|
|
|
|||
|
|
@ -863,7 +863,8 @@ fn perform_strip(png: &mut PngData, opts: &Options) {
|
|||
*b"cHRM", *b"gAMA", *b"iCCP", *b"sBIT", *b"sRGB", *b"bKGD", *b"hIST", *b"pHYs",
|
||||
*b"sPLT",
|
||||
];
|
||||
for hdr in &PRESERVED_HEADERS {
|
||||
let keys: Vec<[u8; 4]> = raw.aux_headers.keys().cloned().collect();
|
||||
for hdr in &keys {
|
||||
if !PRESERVED_HEADERS.contains(hdr) {
|
||||
raw.aux_headers.remove(hdr);
|
||||
}
|
||||
|
|
|
|||
BIN
tests/files/issue-171.png
Normal file
BIN
tests/files/issue-171.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 220 B |
|
|
@ -600,6 +600,7 @@ fn issue_159() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
fn issue_167() {
|
||||
test_it_converts(
|
||||
"tests/files/issue-167.png",
|
||||
|
|
@ -610,3 +611,15 @@ fn issue_167() {
|
|||
BitDepth::Eight,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_171() {
|
||||
test_it_converts(
|
||||
"tests/files/issue-171.png",
|
||||
None,
|
||||
ColorType::Grayscale,
|
||||
BitDepth::Eight,
|
||||
ColorType::Grayscale,
|
||||
BitDepth::Eight,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue