PngReader Class

Contains methods and properties used to read PNG images.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public sealed class PngReader : ImageReader

Remarks

PNG (Portable Network Graphics) was created to replace the obsolete GIF format due to a legal problem caused by the LZW algorithm used in GIF. In comparison with GIF, the PNG format has three main advantages:

  • alpha channel (variable transparency),
  • gamma correction (cross-platform control of image brightness),
  • two-dimensional interlacing (method of progressive displaying).

PNG supports palette-based images with palettes of 24-bit RGB or 32-bit RGBA colors, grayscale images (with or without alpha channel), and full-color non-palette-based images with or without alpha channel.

Examples

C#
using (var reader = new PngReader(@"Images\in.png"))
using (var rotate = new Rotate(90))
using (var writer = new PngWriter(@"Images\Output\out.png"))
{
    writer.IsInterlaced = true;
    Pipeline.Run(reader + rotate + writer);
}

Inheritance Hierarchy

System.Object

Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also

Reference

Manual