From 5c4aa18ab6404236a8fa3e03ea5fd75cb16c2445 Mon Sep 17 00:00:00 2001 From: Ildar Khayrutdinov Date: Tue, 6 Aug 2019 16:39:32 +0300 Subject: [PATCH] #244 Update documentations --- src/ImageSharp/Formats/Png/PngEncoderCore.cs | 20 +++++++++---------- .../Formats/Png/PngEncoderHelpers.cs | 3 +++ .../Formats/Png/PngEncoderOptions.cs | 2 +- .../Formats/Png/PngEncoderOptionsHelpers.cs | 2 +- .../Formats/Png/PngEncoderTests.cs | 3 +-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ImageSharp/Formats/Png/PngEncoderCore.cs b/src/ImageSharp/Formats/Png/PngEncoderCore.cs index 17fae9f0cb..cbe1063f65 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderCore.cs @@ -85,32 +85,32 @@ internal sealed class PngEncoderCore : IDisposable private int height; /// - /// The previous scanline. + /// The raw data of previous scanline. /// private IManagedByteBuffer previousScanline; /// - /// The raw scanline. + /// The raw data of current scanline. /// private IManagedByteBuffer currentScanline; /// - /// The common buffer for the filters + /// The common buffer for the filters. /// private IManagedByteBuffer filterBuffer; /// - /// The buffer for the sub filter + /// The ext buffer for the sub filter, . /// private IManagedByteBuffer subFilter; /// - /// The buffer for the average filter + /// The ext buffer for the average filter, . /// private IManagedByteBuffer averageFilter; /// - /// The buffer for the Paeth filter + /// The ext buffer for the Paeth filter, . /// private IManagedByteBuffer paethFilter; @@ -390,7 +390,7 @@ private void CollectPixelBytes(ReadOnlySpan rowSpan, IQuantizedF } /// - /// Apply filter for the pixel bytes. + /// Apply filter for the raw scanline. /// private IManagedByteBuffer FilterPixelBytes() { @@ -780,9 +780,7 @@ private void AllocateExtBuffers() int resultLength = this.filterBuffer.Length(); this.subFilter = this.memoryAllocator.AllocateManagedByteBuffer(resultLength, AllocationOptions.Clean); - this.averageFilter = this.memoryAllocator.AllocateManagedByteBuffer(resultLength, AllocationOptions.Clean); - this.paethFilter = this.memoryAllocator.AllocateManagedByteBuffer(resultLength, AllocationOptions.Clean); } } @@ -827,7 +825,7 @@ private void EncodeAdam7Pixels(ImageFrame pixels, ZlibDeflateStr { int startRow = Adam7.FirstRow[pass]; int startCol = Adam7.FirstColumn[pass]; - int blockHeight = Adam7.ComputeBlockHeight(height, pass); + ////int blockHeight = Adam7.ComputeBlockHeight(height, pass); int blockWidth = Adam7.ComputeBlockWidth(width, pass); int bytesPerScanline = this.bytesPerPixel <= 1 @@ -883,7 +881,7 @@ private void EncodeAdam7IndexedPixels(IQuantizedFrame quantized, { int startRow = Adam7.FirstRow[pass]; int startCol = Adam7.FirstColumn[pass]; - int blockHeight = Adam7.ComputeBlockHeight(height, pass); + ////int blockHeight = Adam7.ComputeBlockHeight(height, pass); int blockWidth = Adam7.ComputeBlockWidth(width, pass); int bytesPerScanline = this.bytesPerPixel <= 1 diff --git a/src/ImageSharp/Formats/Png/PngEncoderHelpers.cs b/src/ImageSharp/Formats/Png/PngEncoderHelpers.cs index 2faaea3608..78cd5d8742 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderHelpers.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderHelpers.cs @@ -7,6 +7,9 @@ namespace SixLabors.ImageSharp.Formats.Png { + /// + /// The helper methods for class. + /// internal static class PngEncoderHelpers { /// diff --git a/src/ImageSharp/Formats/Png/PngEncoderOptions.cs b/src/ImageSharp/Formats/Png/PngEncoderOptions.cs index 14b9ca8602..7248a6858a 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderOptions.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderOptions.cs @@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.Formats.Png { /// - /// The options class. + /// The options structure for the . /// /// internal class PngEncoderOptions : IPngEncoderOptions diff --git a/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs b/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs index ed5bc95e6c..1bc169f0d8 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Png { /// - /// The PNG encoder options helper methods class. + /// The helper methods for the PNG encoder options. /// internal static class PngEncoderOptionsHelpers { diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs index eb6c04df47..300d8f61f4 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. // ReSharper disable InconsistentNaming -using System.Diagnostics; using System.IO; using System.Linq; @@ -134,7 +133,7 @@ public void WorksWithAllFilterMethods(TestImageProvider provider where TPixel : struct, IPixel { foreach (PngInterlaceMode interlaceMode in InterlaceMode) - { + { TestPngEncoderCore( provider, PngColorType.RgbWithAlpha,