ErrorDiffusionColorDithering Class |
Namespace: Accord.Imaging.ColorReduction
The ErrorDiffusionColorDithering type exposes the following members.
Name | Description | |
---|---|---|
ErrorDiffusionColorDithering |
Initializes a new instance of the ErrorDiffusionColorDithering class.
|
Name | Description | |
---|---|---|
ColorTable |
Color table to use for image dithering. Must contain 2-256 colors.
| |
UseCaching |
Use color caching during color dithering or not.
|
Name | Description | |
---|---|---|
Apply(Bitmap) |
Perform color dithering for the specified image.
| |
Apply(UnmanagedImage) |
Perform color dithering for the specified image.
| |
Diffuse |
Do error diffusion.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
height |
Processing image's height.
| |
pixelSize |
Processing image's pixel size in bytes.
| |
stride |
Processing image's stride (line size).
| |
width |
Processing image's width.
| |
x |
Current processing X coordinate.
| |
y |
Current processing Y coordinate.
|
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
The class is the base class for color dithering algorithms based on error diffusion.
Color dithering with error diffusion is based on the idea that each pixel from the specified source image is substituted with a best matching color (or better say with color's index) from the specified color table. However, the error (difference between color value in the source image and the best matching color) is diffused to neighbor pixels of the source image, which affects the way those pixels are substituted by colors from the specified table.
The image processing routine accepts 24/32 bpp color images for processing. As a result this routine produces 4 bpp or 8 bpp indexed image, which depends on size of the specified color table - 4 bpp result for color tables with 16 colors or less; 8 bpp result for larger color tables.