File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#nullable disable
44
55using SixLabors . ImageSharp . Advanced ;
6+ using SixLabors . ImageSharp . Processing . Processors . Quantization ;
67
78namespace SixLabors . ImageSharp . Formats . Png ;
89
@@ -11,6 +12,16 @@ namespace SixLabors.ImageSharp.Formats.Png;
1112/// </summary>
1213public class PngEncoder : QuantizingImageEncoder
1314{
15+ /// <summary>
16+ /// Initializes a new instance of the <see cref="PngEncoder"/> class.
17+ /// </summary>
18+ public PngEncoder ( )
19+
20+ // Hack. TODO: Investigate means to fix/optimize the Wu quantizer.
21+ // The Wu quantizer does not handle the default sampling strategy well for some larger images.
22+ // It's expensive and the results are not better than the extensive strategy.
23+ => this . PixelSamplingStrategy = new ExtensivePixelSamplingStrategy ( ) ;
24+
1425 /// <summary>
1526 /// Gets the number of bits per sample or per palette index (not per pixel).
1627 /// Not all values are allowed for all <see cref="ColorType" /> values.
Original file line number Diff line number Diff line change @@ -9,9 +9,6 @@ namespace SixLabors.ImageSharp.Memory;
99/// Represents a buffer of value type objects
1010/// interpreted as a 2D region of <see cref="Width"/> x <see cref="Height"/> elements.
1111/// </summary>
12- /// <remarks>
13- /// Before RC1, this class might be target of API changes, use it on your own risk!
14- /// </remarks>
1512/// <typeparam name="T">The value type.</typeparam>
1613public sealed class Buffer2D < T > : IDisposable
1714 where T : struct
You can’t perform that action at this time.
0 commit comments