From b19fdd4472e1ade8e8ba6d60e3dbb3fb560cda92 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Sun, 20 Aug 2017 13:31:10 +0100 Subject: [PATCH] remove unneeded public constants --- src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs | 4 ++-- src/ImageSharp/Image/ImageBase{TPixel}.cs | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs index f26476222..919429ed9 100644 --- a/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs @@ -120,11 +120,11 @@ namespace SixLabors.ImageSharp.Formats this.currentStream.Read(palette, 0, colorMapSize); } - if (this.infoHeader.Width > Image.MaxWidth || this.infoHeader.Height > Image.MaxHeight) + if (this.infoHeader.Width > int.MaxValue || this.infoHeader.Height > int.MaxValue) { throw new ArgumentOutOfRangeException( $"The input bitmap '{this.infoHeader.Width}x{this.infoHeader.Height}' is " - + $"bigger then the max allowed size '{Image.MaxWidth}x{Image.MaxHeight}'"); + + $"bigger then the max allowed size '{int.MaxValue}x{int.MaxValue}'"); } Image image = new Image(this.configuration, this.infoHeader.Width, this.infoHeader.Height); diff --git a/src/ImageSharp/Image/ImageBase{TPixel}.cs b/src/ImageSharp/Image/ImageBase{TPixel}.cs index ff7b04685..ea3649875 100644 --- a/src/ImageSharp/Image/ImageBase{TPixel}.cs +++ b/src/ImageSharp/Image/ImageBase{TPixel}.cs @@ -19,16 +19,6 @@ namespace SixLabors.ImageSharp public abstract class ImageBase : IImageBase where TPixel : struct, IPixel { - /// - /// Gets or sets the maximum allowable width in pixels. - /// - public const int MaxWidth = int.MaxValue; - - /// - /// Gets or sets the maximum allowable height in pixels. - /// - public const int MaxHeight = int.MaxValue; - #pragma warning disable SA1401 // Fields must be private /// /// The image pixels. Not private as Buffer2D requires an array in its constructor.