Baker76.ColorQuant 1.0.27

dotnet add package Baker76.ColorQuant --version 1.0.27
                    
NuGet\Install-Package Baker76.ColorQuant -Version 1.0.27
                    
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="Baker76.ColorQuant" Version="1.0.27" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Baker76.ColorQuant" Version="1.0.27" />
                    
Directory.Packages.props
<PackageReference Include="Baker76.ColorQuant" />
                    
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 Baker76.ColorQuant --version 1.0.27
                    
#r "nuget: Baker76.ColorQuant, 1.0.27"
                    
#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.
#addin nuget:?package=Baker76.ColorQuant&version=1.0.27
                    
Install as a Cake Addin
#tool nuget:?package=Baker76.ColorQuant&version=1.0.27
                    
Install as a Cake Tool

Baker76.ColorQuant

Build status Code coverage NuGet Version License

Baker76.ColorQuant is a C# implementation of the Xiaolin Wu's Color Quantizer (v. 2). For a given 32-bit RGB or ARGB image, it will produce a 8-bit palletized image.

Description Value
License The MIT License (MIT)
Documentation http://jeremyansel.github.io/Baker76.ColorQuant
Code coverage https://jeremyansel.github.io/Baker76.ColorQuant/coverage/
Source code https://github.com/JeremyAnsel/Baker76.ColorQuant
Nuget https://www.nuget.org/packages/Baker76.ColorQuant
Build https://ci.appveyor.com/project/JeremyAnsel/jeremyansel-colorquant/branch/master

C Implementation of Xiaolin Wu's Color Quantizer (v. 2) (see Graphics Gems volume II, pages 126-133) : http://www.ece.mcmaster.ca/~xwu/cq.c.

Algorithm: Greedy orthogonal bipartition of RGB space for variance minimization aided by inclusion-exclusion tricks. For speed no nearest neighbor search is done. Slightly better performance can be expected by more sophisticated but more expensive versions.

Usage

For image with RGB data:

var quantizer = new WuColorQuantizer();
ColorQuantizerResult result = quantizer.Quantize(image, colorCount);

For image with ARGB data:

var quantizer = new WuAlphaColorQuantizer();
ColorQuantizerResult result = quantizer.Quantize(image, colorCount);

ColorQuantizerResult contains a palette and the result by

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Baker76.ColorQuant:

Package Downloads
Baker76.Atlas

Tools for generating and parsing Crunch texture atlas format.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.27 108 6/27/2025
1.0.26 109 6/27/2025
1.0.25 143 6/26/2025