public class ColorConvertOp extends java.lang.Object implements BufferedImageOp, RasterOp
| Constructor and Description |
|---|
ColorConvertOp(java.awt.color.ColorSpace srcCspace,
java.awt.color.ColorSpace dstCspace,
java.awt.RenderingHints hints)
Convert from a source colorspace to a destination colorspace.
|
ColorConvertOp(java.awt.color.ColorSpace cspace,
java.awt.RenderingHints hints)
Convert a BufferedImage through a ColorSpace.
|
ColorConvertOp(java.awt.color.ICC_Profile[] profiles,
java.awt.RenderingHints hints)
Convert from a source colorspace to a destinatino colorspace.
|
ColorConvertOp(java.awt.RenderingHints hints)
Convert from source color space to destination color space.
|
| Modifier and Type | Method and Description |
|---|---|
BufferedImage |
createCompatibleDestImage(BufferedImage src,
ColorModel dstCM)
Creates an empty BufferedImage with the size equal to the source and the
correct number of bands for the conversion defined in this Op.
|
WritableRaster |
createCompatibleDestRaster(Raster src)
Creates a new WritableRaster with the size equal to the source and the
correct number of bands.
|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst)
Converts the source image using the conversion path specified in the
constructor.
|
WritableRaster |
filter(Raster src,
WritableRaster dest)
Converts the source raster using the conversion path specified in the
constructor.
|
java.awt.geom.Rectangle2D |
getBounds2D(BufferedImage src)
Returns the corresponding destination boundary of a source boundary.
|
java.awt.geom.Rectangle2D |
getBounds2D(Raster src)
Returns the corresponding destination boundary of a source boundary.
|
java.awt.color.ICC_Profile[] |
getICC_Profiles()
Returns the array of ICC_Profiles used to create this Op, or null if the
Op was created using ColorSpace arguments.
|
java.awt.geom.Point2D |
getPoint2D(java.awt.geom.Point2D src,
java.awt.geom.Point2D dst)
Returns the corresponding destination point for a source point.
|
java.awt.RenderingHints |
getRenderingHints()
Returns the rendering hints for this op.
|
public ColorConvertOp(java.awt.color.ColorSpace cspace, java.awt.RenderingHints hints)
cspace - The target color space.hints - Rendering hints to use in conversion, if any (may be null)java.lang.NullPointerException - if the ColorSpace is null.public ColorConvertOp(java.awt.color.ColorSpace srcCspace, java.awt.color.ColorSpace dstCspace, java.awt.RenderingHints hints)
srcCspace - The source ColorSpace.dstCspace - The destination ColorSpace.hints - Rendering hints to use in conversion, if any (may be null).java.lang.NullPointerException - if any ColorSpace is null.public ColorConvertOp(java.awt.color.ICC_Profile[] profiles, java.awt.RenderingHints hints)
profiles - An array of ICC_Profile's to convert through.hints - Rendering hints to use in conversion, if any (may be null).java.lang.NullPointerException - if the profile array is null.java.lang.IllegalArgumentException - if the array is not a well-defined
conversion.public ColorConvertOp(java.awt.RenderingHints hints)
hints - Rendering hints to use in conversion, if any (may be null).public final BufferedImage filter(BufferedImage src, BufferedImage dst)
filter in interface BufferedImageOpsrc - The source image.dst - The destination image.java.lang.IllegalArgumentException - if the rasters and/or color spaces are
incompatible.public final WritableRaster filter(Raster src, WritableRaster dest)
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM)
createCompatibleDestImage in interface BufferedImageOpsrc - The source image.dstCM - A color model for the destination image (may be null).java.lang.IllegalArgumentException - if an appropriate colormodel cannot be
chosen with the information given.public WritableRaster createCompatibleDestRaster(Raster src)
createCompatibleDestRaster in interface RasterOpsrc - The source Raster.java.lang.IllegalArgumentException - if there isn't enough colorspace
information to create a compatible Raster.public final java.awt.color.ICC_Profile[] getICC_Profiles()
public final java.awt.RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpgetRenderingHints in interface RasterOppublic final java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D src, java.awt.geom.Point2D dst)
getPoint2D in interface BufferedImageOpgetPoint2D in interface RasterOpsrc - The source point.dst - The transformed destination point.public final java.awt.geom.Rectangle2D getBounds2D(BufferedImage src)
getBounds2D in interface BufferedImageOpsrc - The source boundary.public final java.awt.geom.Rectangle2D getBounds2D(Raster src)
getBounds2D in interface RasterOpsrc - The source boundary.