public class MultitoneOp extends AbstractBufferedImageOp
MultitoneOp
class implements similar functionality as the
Photoshop Duplex function. It allows to specify one or more colors
and tonality curves for each color.
The filter(java.awt.image.BufferedImage, java.awt.image.BufferedImage)
method expects to get a grayscale image to which the
colorization operation is applied.
Constructor and Description |
---|
MultitoneOp(java.awt.Color[] colors,
java.awt.RenderingHints hints)
Creates a
MultitoneOp containing a standard color curve with
more than one color. |
MultitoneOp(ColorCurve[] colorCurves,
java.awt.RenderingHints hints)
Creates a
MultitoneOp from the given ColorCurve
objects. |
MultitoneOp(java.awt.Color color,
java.awt.RenderingHints hints)
Creates a
MultitoneOp containing a standard color curve with
the single color. |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Performs the multi tone operation.
|
createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints
public MultitoneOp(java.awt.Color color, java.awt.RenderingHints hints)
MultitoneOp
containing a standard color curve with
the single color. This creates a monotone result. This is a convenience
constructor which is the same as calling
MultitoneOp(Color[], RenderingHints)
with an array containing
the single color directly.color
- The color to use in the operationhints
- the specified RenderingHints
, or null
public MultitoneOp(java.awt.Color[] colors, java.awt.RenderingHints hints)
MultitoneOp
containing a standard color curve with
more than one color. This creates a monotone result, where the color is
a mixture of the input colors.colors
- The colors to use in the operationhints
- the specified RenderingHints
, or null
java.lang.NullPointerException
- if the colors array is null
or
if any of the color values is null
.public MultitoneOp(ColorCurve[] colorCurves, java.awt.RenderingHints hints)
MultitoneOp
from the given ColorCurve
objects.colorCurves
- The ColorCurve
objects from which to create
this MultitoneOp
hints
- the specified RenderingHints
, or null
java.lang.NullPointerException
- if the colorCurves parameter or any of the
entries is null
.public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
Note: This class supports filtering within an image, that is, calling
this method with src == dst
is legal.
filter
in interface java.awt.image.BufferedImageOp
filter
in class AbstractBufferedImageOp
src
- The src image to be filtered.dst
- The dest image into which to place the resized image. This
may be null
in which case a new image with the
correct size will be created.null
) or dest
into which the resized src image has been drawn.java.lang.NullPointerException
- if the src image is null
.Copyright © 2010 - 2020 Adobe. All Rights Reserved