|
|
|
@ -120,11 +120,11 @@ namespace SixLabors.ImageSharp.Formats |
|
|
|
this.currentStream.Read(palette, 0, colorMapSize); |
|
|
|
} |
|
|
|
|
|
|
|
if (this.infoHeader.Width > Image<TPixel>.MaxWidth || this.infoHeader.Height > Image<TPixel>.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<TPixel>.MaxWidth}x{Image<TPixel>.MaxHeight}'"); |
|
|
|
+ $"bigger then the max allowed size '{int.MaxValue}x{int.MaxValue}'"); |
|
|
|
} |
|
|
|
|
|
|
|
Image<TPixel> image = new Image<TPixel>(this.configuration, this.infoHeader.Width, this.infoHeader.Height); |
|
|
|
|