javax.media.jai.operator
Class ErrorDiffusionDescriptor
java.lang.Object
javax.media.jai.OperationDescriptorImpl
javax.media.jai.operator.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 |
Vendor | com.sun.media.jai |
Description | Performs error diffusion color quantization
using a specified color map and
error filter. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ErrorDiffusionDescriptor.html |
Version | 1.0 |
arg0Desc | The color map. |
arg1Desc | The error filter kernel. |
Parameter List
Name | Class Type |
Default Value |
colorMap | javax.media.jai.LookupTableJAI |
NO_PARAMETER_DEFAULT |
errorKernel | javax.media.jai.KernelJAI |
javax.media.jai.KernelJAI.ERROR_FILTER_FLOYD_STEINBERG |
- See Also:
LookupTableJAI
,
KernelJAI
,
ColorCube
,
OperationDescriptor
,
Serialized Form
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
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 |
ErrorDiffusionDescriptor
public ErrorDiffusionDescriptor()
- Constructor.
create
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)
.
- Parameters:
source0
- RenderedImage
source 0.colorMap
- The color map.errorKernel
- The error filter kernel.
May be null
.hints
- The RenderingHints
to use.
May be null
.
- Returns:
- The
RenderedOp
destination.
- Throws:
IllegalArgumentException
- if source0
is null
.
IllegalArgumentException
- if colorMap
is null
.- See Also:
JAI
,
ParameterBlockJAI
,
RenderedOp