From bc223bcd0b58a88791087f8bd14a50d60e7a770b Mon Sep 17 00:00:00 2001 From: Brian Popow <38701097+brianpopow@users.noreply.github.com> Date: Thu, 23 Apr 2020 18:20:18 +0200 Subject: [PATCH] Change CgBI chunk name to ProprietaryApple Co-Authored-By: James Jackson-South --- src/ImageSharp/Formats/Png/PngChunkType.cs | 2 +- src/ImageSharp/Formats/Png/PngDecoderCore.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Formats/Png/PngChunkType.cs b/src/ImageSharp/Formats/Png/PngChunkType.cs index 67e5ccf55..015f6984d 100644 --- a/src/ImageSharp/Formats/Png/PngChunkType.cs +++ b/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. /// Related issue is here https://github.com/SixLabors/ImageSharp/issues/410 /// - MalformedApple = 0x43674249 + ProprietaryApple = 0x43674249 } } diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs index 757b08481..0247dba35 100644 --- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngDecoderCore.cs @@ -215,8 +215,8 @@ namespace SixLabors.ImageSharp.Formats.Png case PngChunkType.End: this.isEndChunkReached = true; break; - case PngChunkType.MalformedApple: - PngThrowHelper.ThrowInvalidChunkType("Malformed Apple PNG detected! This PNG file is not conform to the specification and cannot be decoded."); + case PngChunkType.ProprietaryApple: + PngThrowHelper.ThrowInvalidChunkType("Proprietary Apple PNG detected! This PNG file is not conform to the specification and cannot be decoded."); break; } }