---
title: "PngReader Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_PngReader.htm
product: "Graphics Mill"
---

# PngReader Class
 
Contains methods and properties used to read PNG images.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
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
  
```csharp
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
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Codecs.ImageReader](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_ImageReader.htm.md)
            - Aurigma.GraphicsMill.Codecs.PngReader
 
## 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

- [PngReader Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Codecs_PngReader.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)

### Manual

- [Supported File Formats](https://www.graphicsmill.com/docs/gm/supported-file-formats.htm.md)
