From d593479a8d692e3bdb593c658acbce4ce33f9d29 Mon Sep 17 00:00:00 2001 From: Dmitry Pentin Date: Fri, 21 May 2021 08:34:26 +0300 Subject: [PATCH] Removed remaining unrelevant code from JpegEncoderCore --- .../Formats/Jpeg/JpegEncoderCore.cs | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs index 019be629bb..2625d490c0 100644 --- a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs @@ -36,11 +36,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg /// private readonly byte[] buffer = new byte[20]; - /// - /// A buffer for reducing the number of stream writes when emitting Huffman tables. 64 seems to be enough. - /// - private readonly byte[] emitBuffer = new byte[64]; - /// /// Gets or sets the subsampling method to use. /// @@ -56,26 +51,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg /// private readonly JpegColorType? colorType; - /// - /// The accumulated bits to write to the stream. - /// - private uint accumulatedBits; - - /// - /// The accumulated bit count. - /// - private uint bitCount; - - /// - /// The scaled chrominance table, in zig-zag order. - /// - private Block8x8F chrominanceQuantTable; - - /// - /// The scaled luminance table, in zig-zag order. - /// - private Block8x8F luminanceQuantTable; - /// /// The output stream. All attempted writes after the first error become no-ops. /// @@ -123,8 +98,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg this.subsample ??= qlty >= 91 ? JpegSubsample.Ratio444 : JpegSubsample.Ratio420; YCbCrEncoder scanEncoder = new YCbCrEncoder(stream, componentCount, qlty); - this.luminanceQuantTable = scanEncoder.LuminanceQuantizationTable; - this.chrominanceQuantTable = scanEncoder.ChrominanceQuantizationTable; // Write the Start Of Image marker. this.WriteApplicationHeader(metadata);