Class ErrorDiffusionDescriptor

All Implemented Interfaces:
OperationDescriptor, RegistryElementDescriptor, Serializable

public class ErrorDiffusionDescriptor
extends OperationDescriptorImpl

An OperationDescriptor describing the "ErrorDiffusion" operation.

The "ErrorDiffusion" operation performs color quantization by finding the nearest color to each pixel in a supplied color map and "diffusing" the color quantization error below and to the right of the pixel.

Resource List
Name Value
GlobalName ErrorDiffusion
LocalName ErrorDiffusion
Description Performs error diffusion color quantization using a specified color map and error filter.
Version 1.0
arg0Desc The color map.
arg1Desc The error filter kernel.

Parameter List
Name Class Type Default Value

See Also:
LookupTableJAI, KernelJAI, ColorCube, OperationDescriptor, Serialized Form

Fields inherited from class
resources, sourceNames, supportedModes
Fields inherited from interface
Constructor Summary
Method Summary
static RenderedOp create(RenderedImage source0, LookupTableJAI colorMap, KernelJAI errorKernel, RenderingHints hints)
          Performs error diffusion color quantization using a specified color map and error filter.
Methods inherited from class
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ErrorDiffusionDescriptor()
Method Detail


public static RenderedOp create(RenderedImage source0,
                                LookupTableJAI colorMap,
                                KernelJAI errorKernel,
                                RenderingHints hints)
Performs error diffusion color quantization using a specified color map and error filter.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.create(String,ParameterBlock,RenderingHints).

source0 - RenderedImage source 0.
colorMap - The color map.
errorKernel - The error filter kernel. May be null.
hints - The RenderingHints to use. May be null.
The RenderedOp destination.
IllegalArgumentException - if source0 is null.
IllegalArgumentException - if colorMap is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp