From 20afe734da409e03827c15c04d6956d99c7d3ad0 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 18 Aug 2016 22:07:17 +1000 Subject: [PATCH] Update errors and config Former-commit-id: e623247db24cb728703e278cb7a548d6229b82ee Former-commit-id: 37ac7c485921004e6f8ac613e32e1ff8f92bca61 Former-commit-id: 71b6e8c354b9c858872988329f1ede76a6e319d2 --- src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs | 10 +++++----- src/ImageProcessorCore/project.json | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs b/src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs index 582f56dad3..a90f9cb8ee 100644 --- a/src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs +++ b/src/ImageProcessorCore/Formats/Png/PngDecoderCore.cs @@ -371,30 +371,30 @@ namespace ImageProcessorCore.Formats /// /// Validates the png header. /// - /// + /// /// Thrown if the image does pass validation. /// private void ValidateHeader() { if (!ColorTypes.ContainsKey(this.header.ColorType)) { - throw new ImageFormatException("Color type is not supported or not valid."); + throw new NotSupportedException("Color type is not supported or not valid."); } if (!ColorTypes[this.header.ColorType].SupportedBitDepths.Contains(this.header.BitDepth)) { - throw new ImageFormatException("Bit depth is not supported or not valid."); + throw new NotSupportedException("Bit depth is not supported or not valid."); } if (this.header.FilterMethod != 0) { - throw new ImageFormatException("The png specification only defines 0 as filter method."); + throw new NotSupportedException("The png specification only defines 0 as filter method."); } if (this.header.InterlaceMethod != 0) { // TODO: Support interlacing - throw new ImageFormatException("Interlacing is not supported."); + throw new NotSupportedException("Interlacing is not supported."); } } diff --git a/src/ImageProcessorCore/project.json b/src/ImageProcessorCore/project.json index 633b9ac81f..3bd2e9c545 100644 --- a/src/ImageProcessorCore/project.json +++ b/src/ImageProcessorCore/project.json @@ -6,8 +6,17 @@ "James Jackson-South and contributors" ], "packOptions": { + "owners": [ + "James Jackson-South and contributors" + ], "projectUrl": "https://github.com/JimBobSquarePants/ImageProcessor", "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0", + "iconUrl": "https://raw.githubusercontent.com/JimBobSquarePants/ImageProcessor/Core/build/icons/imageprocessor-logo-128.png", + "requireLicenseAcceptance": false, + "repository": { + "type": "git", + "url": "https://github.com/JimBobSquarePants/ImageProcessor" + }, "tags": [ "Image Resize Crop Quality Gif Jpg Jpeg Bitmap Png Fluent Animated" ]