diff --git a/src/headers.rs b/src/headers.rs index 1b92d9b3..5b3f70e7 100644 --- a/src/headers.rs +++ b/src/headers.rs @@ -71,7 +71,7 @@ pub enum Headers { None, /// Remove specific chunks Strip(Vec), - /// Headers that won't affect rendering (all but cHRM, gAMA, iCCP, sBIT, sRGB, bKGD, hIST, pHYs, sPLT) + /// Headers that won't affect rendering (all but cICP, iCCP, sBIT, sRGB, pHYs) Safe, /// Remove all non-critical chunks except these Keep(IndexSet), diff --git a/src/lib.rs b/src/lib.rs index f4be1979..fa14a8a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -857,10 +857,8 @@ fn perform_strip(png: &mut PngData, opts: &Options) { } } Headers::Safe => { - const PRESERVED_HEADERS: [[u8; 4]; 9] = [ - *b"cHRM", *b"gAMA", *b"iCCP", *b"sBIT", *b"sRGB", *b"bKGD", *b"hIST", *b"pHYs", - *b"sPLT", - ]; + const PRESERVED_HEADERS: [[u8; 4]; 5] = + [*b"cICP", *b"iCCP", *b"sBIT", *b"sRGB", *b"pHYs"]; let keys: Vec<[u8; 4]> = raw.aux_headers.keys().cloned().collect(); for hdr in &keys { if !PRESERVED_HEADERS.contains(hdr) {