Browse Source

Change CgBI chunk name to ProprietaryApple

Co-Authored-By: James Jackson-South <james_south@hotmail.com>
pull/1184/head
Brian Popow 6 years ago
committed by GitHub
parent
commit
bc223bcd0b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Formats/Png/PngChunkType.cs
  2. 4
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

2
src/ImageSharp/Formats/Png/PngChunkType.cs

@ -125,6 +125,6 @@ namespace SixLabors.ImageSharp.Formats.Png
/// Malformed chunk named CgBI produced by apple, which is not conform to the specification. /// Malformed chunk named CgBI produced by apple, which is not conform to the specification.
/// Related issue is here https://github.com/SixLabors/ImageSharp/issues/410 /// Related issue is here https://github.com/SixLabors/ImageSharp/issues/410
/// </summary> /// </summary>
MalformedApple = 0x43674249 ProprietaryApple = 0x43674249
} }
} }

4
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -215,8 +215,8 @@ namespace SixLabors.ImageSharp.Formats.Png
case PngChunkType.End: case PngChunkType.End:
this.isEndChunkReached = true; this.isEndChunkReached = true;
break; break;
case PngChunkType.MalformedApple: case PngChunkType.ProprietaryApple:
PngThrowHelper.ThrowInvalidChunkType("Malformed Apple PNG detected! This PNG file is not conform to the specification and cannot be decoded."); PngThrowHelper.ThrowInvalidChunkType("Proprietary Apple PNG detected! This PNG file is not conform to the specification and cannot be decoded.");
break; break;
} }
} }

Loading…
Cancel
Save