Class TIFFImageDecoder
- java.lang.Object
-
- org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl
-
- org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder
-
- All Implemented Interfaces:
ImageDecoder
public class TIFFImageDecoder extends ImageDecoderImpl
A baseline TIFF reader. The reader has some functionality in addition to the baseline specifications for Bilevel images, for which the group 3 and group 4 decompression schemes have been implemented. Support for LZW decompression has also been added. Support for Horizontal differencing predictor decoding is also included, when used with LZW compression. However, this support is limited to data with bitsPerSample value of 8. When reading in RGB images, support for alpha and extraSamples being present has been added. Support for reading in images with 16 bit samples has been added. Support for the SampleFormat tag (signed samples as well as floating-point samples) has also been added. In all other cases, support is limited to Baseline specifications.
-
-
Field Summary
Fields Modifier and Type Field Description static intTIFF_BITS_PER_SAMPLEstatic intTIFF_COLORMAPstatic intTIFF_COMPRESSIONstatic intTIFF_EXTRA_SAMPLESstatic intTIFF_FILL_ORDERstatic intTIFF_ICC_PROFILEstatic intTIFF_IMAGE_LENGTHstatic intTIFF_IMAGE_WIDTHstatic intTIFF_PHOTOMETRIC_INTERPRETATIONstatic intTIFF_PLANAR_CONFIGURATIONstatic intTIFF_PREDICTORstatic intTIFF_RESOLUTION_UNITstatic intTIFF_ROWS_PER_STRIPstatic intTIFF_S_MAX_SAMPLE_VALUEstatic intTIFF_S_MIN_SAMPLE_VALUEstatic intTIFF_SAMPLE_FORMATstatic intTIFF_SAMPLES_PER_PIXELstatic intTIFF_STRIP_BYTE_COUNTSstatic intTIFF_STRIP_OFFSETSstatic intTIFF_T4_OPTIONSstatic intTIFF_T6_OPTIONSstatic intTIFF_TILE_BYTE_COUNTSstatic intTIFF_TILE_LENGTHstatic intTIFF_TILE_OFFSETSstatic intTIFF_TILE_WIDTHstatic intTIFF_X_RESOLUTIONstatic intTIFF_Y_RESOLUTION-
Fields inherited from class org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl
input, param
-
-
Constructor Summary
Constructors Constructor Description TIFFImageDecoder(SeekableStream input, TIFFDecodeParam param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.RenderedImagedecodeAsRenderedImage(int page)Returns aRenderedImagethat contains the decoded contents of theSeekableStreamassociated with thisImageDecoder.intgetNumPages()Returns the number of pages present in the current stream.-
Methods inherited from class org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl
decodeAsRaster, decodeAsRaster, decodeAsRenderedImage, getInputStream, getParam, setParam
-
-
-
-
Field Detail
-
TIFF_IMAGE_WIDTH
public static final int TIFF_IMAGE_WIDTH
- See Also:
- Constant Field Values
-
TIFF_IMAGE_LENGTH
public static final int TIFF_IMAGE_LENGTH
- See Also:
- Constant Field Values
-
TIFF_BITS_PER_SAMPLE
public static final int TIFF_BITS_PER_SAMPLE
- See Also:
- Constant Field Values
-
TIFF_COMPRESSION
public static final int TIFF_COMPRESSION
- See Also:
- Constant Field Values
-
TIFF_PHOTOMETRIC_INTERPRETATION
public static final int TIFF_PHOTOMETRIC_INTERPRETATION
- See Also:
- Constant Field Values
-
TIFF_FILL_ORDER
public static final int TIFF_FILL_ORDER
- See Also:
- Constant Field Values
-
TIFF_STRIP_OFFSETS
public static final int TIFF_STRIP_OFFSETS
- See Also:
- Constant Field Values
-
TIFF_SAMPLES_PER_PIXEL
public static final int TIFF_SAMPLES_PER_PIXEL
- See Also:
- Constant Field Values
-
TIFF_ROWS_PER_STRIP
public static final int TIFF_ROWS_PER_STRIP
- See Also:
- Constant Field Values
-
TIFF_STRIP_BYTE_COUNTS
public static final int TIFF_STRIP_BYTE_COUNTS
- See Also:
- Constant Field Values
-
TIFF_X_RESOLUTION
public static final int TIFF_X_RESOLUTION
- See Also:
- Constant Field Values
-
TIFF_Y_RESOLUTION
public static final int TIFF_Y_RESOLUTION
- See Also:
- Constant Field Values
-
TIFF_PLANAR_CONFIGURATION
public static final int TIFF_PLANAR_CONFIGURATION
- See Also:
- Constant Field Values
-
TIFF_T4_OPTIONS
public static final int TIFF_T4_OPTIONS
- See Also:
- Constant Field Values
-
TIFF_T6_OPTIONS
public static final int TIFF_T6_OPTIONS
- See Also:
- Constant Field Values
-
TIFF_RESOLUTION_UNIT
public static final int TIFF_RESOLUTION_UNIT
- See Also:
- Constant Field Values
-
TIFF_PREDICTOR
public static final int TIFF_PREDICTOR
- See Also:
- Constant Field Values
-
TIFF_COLORMAP
public static final int TIFF_COLORMAP
- See Also:
- Constant Field Values
-
TIFF_TILE_WIDTH
public static final int TIFF_TILE_WIDTH
- See Also:
- Constant Field Values
-
TIFF_TILE_LENGTH
public static final int TIFF_TILE_LENGTH
- See Also:
- Constant Field Values
-
TIFF_TILE_OFFSETS
public static final int TIFF_TILE_OFFSETS
- See Also:
- Constant Field Values
-
TIFF_TILE_BYTE_COUNTS
public static final int TIFF_TILE_BYTE_COUNTS
- See Also:
- Constant Field Values
-
TIFF_EXTRA_SAMPLES
public static final int TIFF_EXTRA_SAMPLES
- See Also:
- Constant Field Values
-
TIFF_SAMPLE_FORMAT
public static final int TIFF_SAMPLE_FORMAT
- See Also:
- Constant Field Values
-
TIFF_S_MIN_SAMPLE_VALUE
public static final int TIFF_S_MIN_SAMPLE_VALUE
- See Also:
- Constant Field Values
-
TIFF_S_MAX_SAMPLE_VALUE
public static final int TIFF_S_MAX_SAMPLE_VALUE
- See Also:
- Constant Field Values
-
TIFF_ICC_PROFILE
public static final int TIFF_ICC_PROFILE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TIFFImageDecoder
public TIFFImageDecoder(SeekableStream input, TIFFDecodeParam param)
-
-
Method Detail
-
getNumPages
public int getNumPages() throws java.io.IOExceptionDescription copied from class:ImageDecoderImplReturns the number of pages present in the current stream. By default, the return value is 1. Subclasses that deal with multi-page formats should override this method.- Specified by:
getNumPagesin interfaceImageDecoder- Overrides:
getNumPagesin classImageDecoderImpl- Throws:
java.io.IOException
-
decodeAsRenderedImage
public java.awt.image.RenderedImage decodeAsRenderedImage(int page) throws java.io.IOExceptionDescription copied from class:ImageDecoderImplReturns aRenderedImagethat contains the decoded contents of theSeekableStreamassociated with thisImageDecoder. The given page of a multi-page image is decoded. If the page does not exist, an IOException will be thrown. Page numbering begins at zero.- Specified by:
decodeAsRenderedImagein interfaceImageDecoder- Specified by:
decodeAsRenderedImagein classImageDecoderImpl- Parameters:
page- The page to be decoded.- Throws:
java.io.IOException
-
-