• Api Documentation
  • Code Coverage
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • JeremyAnsel.ColorQuant
      • ColorQuantizerResult
      • IColorQuantizer
      • WuAlphaColorQuantizer
      • WuColorQuantizer

    Class WuAlphaColorQuantizer

    A Wu's color quantizer with alpha channel.

    Inheritance
    object
    WuAlphaColorQuantizer
    Implements
    IColorQuantizer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: JeremyAnsel.ColorQuant
    Assembly: JeremyAnsel.ColorQuant.dll
    Syntax
    public sealed class WuAlphaColorQuantizer : IColorQuantizer
    Remarks

    Based on 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.

    Methods

    | Edit this page View Source

    Quantize(byte[])

    Quantizes an image.

    Declaration
    public ColorQuantizerResult Quantize(byte[] image)
    Parameters
    Type Name Description
    byte[] image

    The image (ARGB).

    Returns
    Type Description
    ColorQuantizerResult

    The result.

    | Edit this page View Source

    Quantize(byte[], int)

    Quantizes an image.

    Declaration
    public ColorQuantizerResult Quantize(byte[] image, int colorCount)
    Parameters
    Type Name Description
    byte[] image

    The image (ARGB).

    int colorCount

    The color count.

    Returns
    Type Description
    ColorQuantizerResult

    The result.

    Implements

    IColorQuantizer
    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 1992 Xiaolin Wu, 2014-2022 Jérémy Ansel