From 4e73471d96f1ed4c6078f75bc4d1b4f14a342ed7 Mon Sep 17 00:00:00 2001 From: Dmitry Pentin Date: Fri, 21 May 2021 13:09:08 +0300 Subject: [PATCH] Small QoL fixes --- .../Jpeg/Components/Encoder/YCbCrEncoder{TPixel}.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrEncoder{TPixel}.cs b/src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrEncoder{TPixel}.cs index a10f40b09a..051acf0e84 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrEncoder{TPixel}.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrEncoder{TPixel}.cs @@ -2,18 +2,15 @@ // Licensed under the Apache License, Version 2.0. using System; -using System.Collections.Generic; using System.IO; using System.Runtime.CompilerServices; -using System.Text; using System.Threading; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder { - internal class YCbCrEncoder - where TPixel : unmanaged, IPixel + internal class YCbCrEncoder { /// /// Number of bytes cached before being written to target stream via Stream.Write(byte[], offest, count). @@ -57,8 +54,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder private Block8x8F temporalBlock1; private Block8x8F temporalBlock2; - private ImageFrame source; - /// /// The output stream. All attempted writes after the first error become no-ops. /// @@ -290,11 +285,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder private void EncodeGrayscale(Image pixels, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel { - // TODO: Need a JpegScanEncoder class or struct that encapsulates the scan-encoding implementation. (Similar to JpegScanDecoder.) - // (Partially done with YCbCrForwardConverter) - Block8x8F temp1 = default; - Block8x8F temp2 = default; - Block8x8F onStackLuminanceQuantTable = this.luminanceQuantTable; var unzig = ZigZag.CreateUnzigTable();