GreenPng 2.2.1

dotnet add package GreenPng --version 2.2.1
                    
NuGet\Install-Package GreenPng -Version 2.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GreenPng" Version="2.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GreenPng" Version="2.2.1" />
                    
Directory.Packages.props
<PackageReference Include="GreenPng" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GreenPng --version 2.2.1
                    
#r "nuget: GreenPng, 2.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GreenPng@2.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GreenPng&version=2.2.1
                    
Install as a Cake Addin
#tool nuget:?package=GreenPng&version=2.2.1
                    
Install as a Cake Tool

GreenPng

Fastest PNG decoder for .NET designed to be blazingly fast and memory efficient.

It is focused on decoding 8-bit-per-channel images to little-endian BGRA format (like VK_FORMAT_B8G8R8A8_SRGB or SDL_PIXELFORMAT_ARGB8888).

Comparsion

Project Speed Memory efficiency Free license
GreenPng :green_circle:
StbImageSharp 💡 :yellow_circle:
Magick.NET ❄️ :yellow_circle:
SixLabors.ImageSharp 💡 :yellow_circle:

Format support

Type 1, 2, 4 bit 8 bit 16 bit
Greyscale
Truecolor
Indexed
Indexed (with transparency)
Greyscale with alpha
Truecolor with alpha

How to use

Installing from NuGet

nuget

dotnet add package GreenPng

Easy use

byte[] image = PngDecoder.Decode(pngFileData, out PngHeader header);

int width = header.Width;
int height = header.Height;

More advanced way

bool ok = PngDecoder.TryDecodeHeader(pngFileData, out PngHeader header);

ok = PngDecoder.IsHeaderSupported(header);

byte[] image = new byte[header.ByteSize];

ok = PngDecoder.TryDecode(pngFileData, header, image);

Not supported

  • Interlacing
  • 16 bit
  • Unusual chunks
  • War

Git Workspace

This is workspace of Git Workspace paradigm.<br> Main component: GreenPng<br> Components:

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.1 94 5/12/2026
2.2.0 86 5/11/2026
2.1.0 83 5/5/2026
2.0.0 87 4/30/2026
1.0.3 94 4/28/2026
1.0.2 96 4/28/2026
1.0.1 92 4/28/2026
1.0.0 96 4/28/2026