Class PNGRed
- java.lang.Object
-
- org.apache.xmlgraphics.image.rendered.AbstractRed
-
- org.apache.xmlgraphics.image.codec.png.PNGRed
-
- All Implemented Interfaces:
java.awt.image.RenderedImage,CachableRed
public class PNGRed extends AbstractRed
- Version:
- $Id: PNGRed.java 1732018 2016-02-24 04:51:06Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description static intPNG_COLOR_GRAYstatic intPNG_COLOR_GRAY_ALPHAstatic intPNG_COLOR_PALETTEstatic intPNG_COLOR_RGBstatic intPNG_COLOR_RGB_ALPHAstatic intPNG_FILTER_AVERAGEstatic intPNG_FILTER_NONEstatic intPNG_FILTER_PAETHstatic intPNG_FILTER_SUBstatic intPNG_FILTER_UP-
Fields inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed
cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth
-
-
Constructor Summary
Constructors Constructor Description PNGRed(java.io.InputStream stream)PNGRed(java.io.InputStream stream, PNGDecodeParam decodeParam)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.WritableRastercopyData(java.awt.image.WritableRaster wr)static java.awt.image.ColorModelcreateComponentColorModel(java.awt.image.SampleModel sm)A convenience method to create an instance ofComponentColorModelsuitable for use with the givenSampleModel.java.awt.image.RastergetTile(int tileX, int tileY)-
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, getProperty, getPropertyNames, getSampleModel, getSources, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, getXTile, getYTile, init, init, makeTile, updateTileGridInfo
-
-
-
-
Field Detail
-
PNG_COLOR_GRAY
public static final int PNG_COLOR_GRAY
- See Also:
- Constant Field Values
-
PNG_COLOR_RGB
public static final int PNG_COLOR_RGB
- See Also:
- Constant Field Values
-
PNG_COLOR_PALETTE
public static final int PNG_COLOR_PALETTE
- See Also:
- Constant Field Values
-
PNG_COLOR_GRAY_ALPHA
public static final int PNG_COLOR_GRAY_ALPHA
- See Also:
- Constant Field Values
-
PNG_COLOR_RGB_ALPHA
public static final int PNG_COLOR_RGB_ALPHA
- See Also:
- Constant Field Values
-
PNG_FILTER_NONE
public static final int PNG_FILTER_NONE
- See Also:
- Constant Field Values
-
PNG_FILTER_SUB
public static final int PNG_FILTER_SUB
- See Also:
- Constant Field Values
-
PNG_FILTER_UP
public static final int PNG_FILTER_UP
- See Also:
- Constant Field Values
-
PNG_FILTER_AVERAGE
public static final int PNG_FILTER_AVERAGE
- See Also:
- Constant Field Values
-
PNG_FILTER_PAETH
public static final int PNG_FILTER_PAETH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PNGRed
public PNGRed(java.io.InputStream stream) throws java.io.IOException- Throws:
java.io.IOException
-
PNGRed
public PNGRed(java.io.InputStream stream, PNGDecodeParam decodeParam) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
createComponentColorModel
public static java.awt.image.ColorModel createComponentColorModel(java.awt.image.SampleModel sm)
A convenience method to create an instance ofComponentColorModelsuitable for use with the givenSampleModel. TheSampleModelshould have a data type ofDataBuffer.TYPE_BYTE,TYPE_USHORT, orTYPE_INTand between 1 and 4 bands. Depending on the number of bands of theSampleModel, either a gray, gray+alpha, rgb, or rgb+alphaColorModelis returned.
-
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
-
getTile
public java.awt.image.Raster getTile(int tileX, int tileY)- Specified by:
getTilein interfacejava.awt.image.RenderedImage- Overrides:
getTilein classAbstractRed
-
-