public class ColorConvertOp extends Object implements BufferedImageOp, RasterOp
| Constructor and Description |
|---|
ColorConvertOp(ColorSpace srcCspace,
ColorSpace dstCspace,
RenderingHints hints)
Convert from a source colorspace to a destination colorspace.
|
ColorConvertOp(ColorSpace cspace,
RenderingHints hints)
Convert a BufferedImage through a ColorSpace.
|
ColorConvertOp(ICC_Profile[] profiles,
RenderingHints hints)
Convert from a source colorspace to a destinatino colorspace.
|
ColorConvertOp(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.
|
Rectangle2D |
getBounds2D(BufferedImage src)
Returns the corresponding destination boundary of a source boundary.
|
Rectangle2D |
getBounds2D(Raster src)
Returns the corresponding destination boundary of a source boundary.
|
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.
|
Point2D |
getPoint2D(Point2D src,
Point2D dst)
Returns the corresponding destination point for a source point.
|
RenderingHints |
getRenderingHints()
Returns the rendering hints for this op.
|
public ColorConvertOp(ColorSpace cspace, RenderingHints hints)
cspace - The target color space.hints - Rendering hints to use in conversion, if any (may be null)NullPointerException - if the ColorSpace is null.public ColorConvertOp(ColorSpace srcCspace, ColorSpace dstCspace, RenderingHints hints)
srcCspace - The source ColorSpace.dstCspace - The destination ColorSpace.hints - Rendering hints to use in conversion, if any (may be null).NullPointerException - if any ColorSpace is null.public ColorConvertOp(ICC_Profile[] profiles, RenderingHints hints)
profiles - An array of ICC_Profile's to convert through.hints - Rendering hints to use in conversion, if any (may be null).NullPointerException - if the profile array is null.IllegalArgumentException - if the array is not a well-defined
conversion.public ColorConvertOp(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.IllegalArgumentException - if the rasters and/or color spaces are
incompatible.public final WritableRaster filter(Raster src, WritableRaster dest)
filter in interface RasterOpsrc - The source raster.dest - The destination raster.IllegalArgumentException - if the rasters and/or color spaces are
incompatible.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).IllegalArgumentException - if an appropriate colormodel cannot be
chosen with the information given.public WritableRaster createCompatibleDestRaster(Raster src)
createCompatibleDestRaster in interface RasterOpsrc - The source Raster.IllegalArgumentException - if there isn't enough colorspace
information to create a compatible Raster.public final ICC_Profile[] getICC_Profiles()
public final RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpgetRenderingHints in interface RasterOppublic final Point2D getPoint2D(Point2D src, Point2D dst)
getPoint2D in interface BufferedImageOpgetPoint2D in interface RasterOpsrc - The source point.dst - The transformed destination point.public final Rectangle2D getBounds2D(BufferedImage src)
getBounds2D in interface BufferedImageOpsrc - The source boundary.public final Rectangle2D getBounds2D(Raster src)
getBounds2D in interface RasterOpsrc - The source boundary.