Class FormatRed
- java.lang.Object
-
- org.apache.xmlgraphics.image.rendered.AbstractRed
-
- org.apache.xmlgraphics.image.rendered.FormatRed
-
- All Implemented Interfaces:
java.awt.image.RenderedImage
,CachableRed
public class FormatRed extends AbstractRed
This allows you to specify the ColorModel, Alpha premult and/or SampleModel to be used for output. If the input image lacks Alpha and alpha is included in output then it is filled with alpha=1. In all other cases bands are simply copied.- Version:
- $Id: FormatRed.java 1576437 2014-03-11 17:49:35Z vhennebert $ Originally authored by Thomas DeWeese.
-
-
Field Summary
-
Fields inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth
-
-
Constructor Summary
Constructors Constructor Description FormatRed(CachableRed cr, java.awt.image.ColorModel cm)
FormatRed(CachableRed cr, java.awt.image.SampleModel sm)
Construct an instance of CachableRed around a BufferedImage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CachableRed
construct(CachableRed src, java.awt.image.ColorModel cm)
java.awt.image.WritableRaster
copyData(java.awt.image.WritableRaster wr)
java.lang.Object
getProperty(java.lang.String name)
java.lang.String[]
getPropertyNames()
CachableRed
getSource()
fetch the source image for this node.static java.awt.image.ColorModel
makeColorModel(CachableRed cr, java.awt.image.SampleModel sm)
static java.awt.image.SampleModel
makeSampleModel(CachableRed cr, java.awt.image.ColorModel cm)
-
Methods inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed
copyBand, copyToRaster, getBounds, getColorModel, getData, getData, getDependencyRegion, getDirtyRegion, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, getXTile, getYTile, init, init, makeTile, updateTileGridInfo
-
-
-
-
Constructor Detail
-
FormatRed
public FormatRed(CachableRed cr, java.awt.image.SampleModel sm)
Construct an instance of CachableRed around a BufferedImage.
-
FormatRed
public FormatRed(CachableRed cr, java.awt.image.ColorModel cm)
-
-
Method Detail
-
construct
public static CachableRed construct(CachableRed src, java.awt.image.ColorModel cm)
-
getSource
public CachableRed getSource()
fetch the source image for this node.
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getProperty
in interfacejava.awt.image.RenderedImage
- Overrides:
getProperty
in classAbstractRed
-
getPropertyNames
public java.lang.String[] getPropertyNames()
- Specified by:
getPropertyNames
in interfacejava.awt.image.RenderedImage
- Overrides:
getPropertyNames
in classAbstractRed
-
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
-
makeSampleModel
public static java.awt.image.SampleModel makeSampleModel(CachableRed cr, java.awt.image.ColorModel cm)
-
makeColorModel
public static java.awt.image.ColorModel makeColorModel(CachableRed cr, java.awt.image.SampleModel sm)
-
-