From de7d56eeb6df1534e319b81ae2a7334832d88921 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Thu, 29 Dec 2016 17:06:05 +0100 Subject: [PATCH] minor JpegDecoderCore cleanup --- ImageSharp.sln.DotSettings | 1 + src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ImageSharp.sln.DotSettings b/ImageSharp.sln.DotSettings index b0f5aa6927..b058fad4ed 100644 --- a/ImageSharp.sln.DotSettings +++ b/ImageSharp.sln.DotSettings @@ -342,6 +342,7 @@ True AC DC + EOF FDCT IDCT JPEG diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 284ae807b4..0813a3331f 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -1104,7 +1104,7 @@ namespace ImageSharp.Formats throw new ImageFormatException("DRI has wrong length"); } - this.ReadFull(this.Temp, 0, 2); + this.ReadFull(this.Temp, 0, remaining); this.RestartInterval = ((int)this.Temp[0] << 8) + (int)this.Temp[1]; } @@ -1453,15 +1453,9 @@ namespace ImageSharp.Formats /// /// The missing ff00 exception. /// + // ReSharper disable once InconsistentNaming internal class MissingFF00Exception : Exception { } - - /// - /// The short huffman data exception. - /// - private class ShortHuffmanDataException : Exception - { - } } } \ No newline at end of file