Skip to content

Commit

Permalink
#244 Update documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKhayrutdinov committed Aug 6, 2019
1 parent b9f4112 commit 5c4aa18
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
20 changes: 9 additions & 11 deletions src/ImageSharp/Formats/Png/PngEncoderCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,32 +85,32 @@ internal sealed class PngEncoderCore : IDisposable
private int height;

/// <summary>
/// The previous scanline.
/// The raw data of previous scanline.
/// </summary>
private IManagedByteBuffer previousScanline;

/// <summary>
/// The raw scanline.
/// The raw data of current scanline.
/// </summary>
private IManagedByteBuffer currentScanline;

/// <summary>
/// The common buffer for the filters
/// The common buffer for the filters.
/// </summary>
private IManagedByteBuffer filterBuffer;

/// <summary>
/// The buffer for the sub filter
/// The ext buffer for the sub filter, <see cref="PngFilterMethod.Adaptive"/>.
/// </summary>
private IManagedByteBuffer subFilter;

/// <summary>
/// The buffer for the average filter
/// The ext buffer for the average filter, <see cref="PngFilterMethod.Adaptive"/>.
/// </summary>
private IManagedByteBuffer averageFilter;

/// <summary>
/// The buffer for the Paeth filter
/// The ext buffer for the Paeth filter, <see cref="PngFilterMethod.Adaptive"/>.
/// </summary>
private IManagedByteBuffer paethFilter;

Expand Down Expand Up @@ -390,7 +390,7 @@ private void CollectPixelBytes<TPixel>(ReadOnlySpan<TPixel> rowSpan, IQuantizedF
}

/// <summary>
/// Apply filter for the pixel bytes.
/// Apply filter for the raw scanline.
/// </summary>
private IManagedByteBuffer FilterPixelBytes()
{
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -827,7 +825,7 @@ private void EncodeAdam7Pixels<TPixel>(ImageFrame<TPixel> 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
Expand Down Expand Up @@ -883,7 +881,7 @@ private void EncodeAdam7IndexedPixels<TPixel>(IQuantizedFrame<TPixel> 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
Expand Down
3 changes: 3 additions & 0 deletions src/ImageSharp/Formats/Png/PngEncoderHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

namespace SixLabors.ImageSharp.Formats.Png
{
/// <summary>
/// The helper methods for <see cref="PngEncoderCore"/> class.
/// </summary>
internal static class PngEncoderHelpers
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/Png/PngEncoderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace SixLabors.ImageSharp.Formats.Png
{
/// <summary>
/// The <see cref="PngEncoderCore"/> options class.
/// The options structure for the <see cref="PngEncoderCore"/>.
/// </summary>
/// <seealso cref="SixLabors.ImageSharp.Formats.Png.IPngEncoderOptions" />
internal class PngEncoderOptions : IPngEncoderOptions
Expand Down
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace SixLabors.ImageSharp.Formats.Png
{
/// <summary>
/// The PNG encoder options helper methods class.
/// The helper methods for the PNG encoder options.
/// </summary>
internal static class PngEncoderOptionsHelpers
{
Expand Down
3 changes: 1 addition & 2 deletions tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.

// ReSharper disable InconsistentNaming
using System.Diagnostics;
using System.IO;
using System.Linq;

Expand Down Expand Up @@ -134,7 +133,7 @@ public void WorksWithAllFilterMethods<TPixel>(TestImageProvider<TPixel> provider
where TPixel : struct, IPixel<TPixel>
{
foreach (PngInterlaceMode interlaceMode in InterlaceMode)
{
{
TestPngEncoderCore(
provider,
PngColorType.RgbWithAlpha,
Expand Down

0 comments on commit 5c4aa18

Please sign in to comment.