java.lang.Object
org.apache.batik.ext.awt.image.rendered.AbstractRed
org.apache.batik.ext.awt.image.codec.tiff.TIFFImage
- All Implemented Interfaces:
- org.apache.batik.ext.awt.image.rendered.CachableRed, java.awt.image.RenderedImage
- public class TIFFImage
- extends org.apache.batik.ext.awt.image.rendered.AbstractRed
| Fields inherited from class org.apache.batik.ext.awt.image.rendered.AbstractRed |
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth |
|
Method Summary |
java.awt.image.WritableRaster |
copyData(java.awt.image.WritableRaster wr)
|
private java.awt.image.ComponentColorModel |
createAlphaComponentColorModel(int dataType,
int numBands,
boolean isAlphaPremultiplied,
int transparency)
|
private static java.awt.image.SampleModel |
createPixelInterleavedSampleModel(int dataType,
int tileWidth,
int tileHeight,
int bands)
|
private static java.awt.image.Raster |
decodeJPEG(byte[] data,
com.sun.image.codec.jpeg.JPEGDecodeParam decodeParam,
boolean colorConvert,
int minX,
int minY)
Decode a buffer of data into a Raster with the specified location. |
private byte[] |
decodePackbits(byte[] data,
int arraySize,
byte[] dst)
|
private long[] |
getFieldAsLongs(TIFFField field)
Return as a long[] the value of a TIFF_LONG or TIFF_SHORT field. |
TIFFDirectory |
getPrivateIFD(long offset)
Reads a private IFD from a given offset in the stream. |
java.awt.image.Raster |
getTile(int tileX,
int tileY)
Returns tile (tileX, tileY) as a Raster. |
private void |
inflate(byte[] deflated,
byte[] inflated)
Inflates deflated into inflated using the
Inflater constructed during class instantiation. |
private void |
interpretBytesAsInts(byte[] byteArray,
int[] intArray,
int intCount)
|
private void |
interpretBytesAsShorts(byte[] byteArray,
short[] shortArray,
int shortCount)
|
private void |
readInts(int intCount,
int[] intArray)
|
private void |
readShorts(int shortCount,
short[] shortArray)
|
| Methods inherited from class org.apache.batik.ext.awt.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMP_NONE
public static final int COMP_NONE
- See Also:
- Constant Field Values
COMP_FAX_G3_1D
public static final int COMP_FAX_G3_1D
- See Also:
- Constant Field Values
COMP_FAX_G3_2D
public static final int COMP_FAX_G3_2D
- See Also:
- Constant Field Values
COMP_FAX_G4_2D
public static final int COMP_FAX_G4_2D
- See Also:
- Constant Field Values
COMP_LZW
public static final int COMP_LZW
- See Also:
- Constant Field Values
COMP_JPEG_OLD
public static final int COMP_JPEG_OLD
- See Also:
- Constant Field Values
COMP_JPEG_TTN2
public static final int COMP_JPEG_TTN2
- See Also:
- Constant Field Values
COMP_PACKBITS
public static final int COMP_PACKBITS
- See Also:
- Constant Field Values
COMP_DEFLATE
public static final int COMP_DEFLATE
- See Also:
- Constant Field Values
TYPE_UNSUPPORTED
private static final int TYPE_UNSUPPORTED
- See Also:
- Constant Field Values
TYPE_BILEVEL
private static final int TYPE_BILEVEL
- See Also:
- Constant Field Values
TYPE_GRAY_4BIT
private static final int TYPE_GRAY_4BIT
- See Also:
- Constant Field Values
TYPE_GRAY
private static final int TYPE_GRAY
- See Also:
- Constant Field Values
TYPE_GRAY_ALPHA
private static final int TYPE_GRAY_ALPHA
- See Also:
- Constant Field Values
TYPE_PALETTE
private static final int TYPE_PALETTE
- See Also:
- Constant Field Values
TYPE_RGB
private static final int TYPE_RGB
- See Also:
- Constant Field Values
TYPE_RGB_ALPHA
private static final int TYPE_RGB_ALPHA
- See Also:
- Constant Field Values
TYPE_YCBCR_SUB
private static final int TYPE_YCBCR_SUB
- See Also:
- Constant Field Values
TYPE_GENERIC
private static final int TYPE_GENERIC
- See Also:
- Constant Field Values
TIFF_JPEG_TABLES
private static final int TIFF_JPEG_TABLES
- See Also:
- Constant Field Values
TIFF_YCBCR_SUBSAMPLING
private static final int TIFF_YCBCR_SUBSAMPLING
- See Also:
- Constant Field Values
stream
org.apache.batik.ext.awt.image.codec.SeekableStream stream
tileSize
int tileSize
tilesX
int tilesX
tilesY
int tilesY
tileOffsets
long[] tileOffsets
tileByteCounts
long[] tileByteCounts
colormap
char[] colormap
sampleSize
int sampleSize
compression
int compression
palette
byte[] palette
numBands
int numBands
chromaSubH
int chromaSubH
chromaSubV
int chromaSubV
tiffT4Options
long tiffT4Options
tiffT6Options
long tiffT6Options
fillOrder
int fillOrder
predictor
int predictor
decodeParam
com.sun.image.codec.jpeg.JPEGDecodeParam decodeParam
colorConvertJPEG
boolean colorConvertJPEG
inflater
java.util.zip.Inflater inflater
isBigEndian
boolean isBigEndian
imageType
int imageType
isWhiteZero
boolean isWhiteZero
dataType
int dataType
decodePaletteAsShorts
boolean decodePaletteAsShorts
tiled
boolean tiled
decoder
private TIFFFaxDecoder decoder
lzwDecoder
private TIFFLZWDecoder lzwDecoder
TIFFImage
public TIFFImage(org.apache.batik.ext.awt.image.codec.SeekableStream stream,
TIFFDecodeParam param,
int directory)
throws java.io.IOException
- Constructs a TIFFImage that acquires its data from a given
SeekableStream and reads from a particular IFD of the stream.
The index of the first IFD is 0.
decodeJPEG
private static final java.awt.image.Raster decodeJPEG(byte[] data,
com.sun.image.codec.jpeg.JPEGDecodeParam decodeParam,
boolean colorConvert,
int minX,
int minY)
- Decode a buffer of data into a Raster with the specified location.
inflate
private final void inflate(byte[] deflated,
byte[] inflated)
- Inflates
deflated into inflated using the
Inflater constructed during class instantiation.
createPixelInterleavedSampleModel
private static java.awt.image.SampleModel createPixelInterleavedSampleModel(int dataType,
int tileWidth,
int tileHeight,
int bands)
getFieldAsLongs
private final long[] getFieldAsLongs(TIFFField field)
- Return as a long[] the value of a TIFF_LONG or TIFF_SHORT field.
getPrivateIFD
public TIFFDirectory getPrivateIFD(long offset)
throws java.io.IOException
- Reads a private IFD from a given offset in the stream. This
method may be used to obtain IFDs that are referenced
only by private tag values.
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
getTile
public java.awt.image.Raster getTile(int tileX,
int tileY)
- Returns tile (tileX, tileY) as a Raster.
readShorts
private void readShorts(int shortCount,
short[] shortArray)
readInts
private void readInts(int intCount,
int[] intArray)
interpretBytesAsShorts
private void interpretBytesAsShorts(byte[] byteArray,
short[] shortArray,
int shortCount)
interpretBytesAsInts
private void interpretBytesAsInts(byte[] byteArray,
int[] intArray,
int intCount)
decodePackbits
private byte[] decodePackbits(byte[] data,
int arraySize,
byte[] dst)
createAlphaComponentColorModel
private java.awt.image.ComponentColorModel createAlphaComponentColorModel(int dataType,
int numBands,
boolean isAlphaPremultiplied,
int transparency)