Class TIFFImageDecoder
java.lang.Object
org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl
org.apache.xmlgraphics.image.codec.tiff.TIFFImageDecoder
- All Implemented Interfaces:
ImageDecoder
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl
input, param
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecodeAsRenderedImage
(int page) Returns aRenderedImage
that contains the decoded contents of theSeekableStream
associated with thisImageDecoder
.int
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 Details
-
TIFF_IMAGE_WIDTH
public static final int TIFF_IMAGE_WIDTH- See Also:
-
TIFF_IMAGE_LENGTH
public static final int TIFF_IMAGE_LENGTH- See Also:
-
TIFF_BITS_PER_SAMPLE
public static final int TIFF_BITS_PER_SAMPLE- See Also:
-
TIFF_COMPRESSION
public static final int TIFF_COMPRESSION- See Also:
-
TIFF_PHOTOMETRIC_INTERPRETATION
public static final int TIFF_PHOTOMETRIC_INTERPRETATION- See Also:
-
TIFF_FILL_ORDER
public static final int TIFF_FILL_ORDER- See Also:
-
TIFF_STRIP_OFFSETS
public static final int TIFF_STRIP_OFFSETS- See Also:
-
TIFF_SAMPLES_PER_PIXEL
public static final int TIFF_SAMPLES_PER_PIXEL- See Also:
-
TIFF_ROWS_PER_STRIP
public static final int TIFF_ROWS_PER_STRIP- See Also:
-
TIFF_STRIP_BYTE_COUNTS
public static final int TIFF_STRIP_BYTE_COUNTS- See Also:
-
TIFF_X_RESOLUTION
public static final int TIFF_X_RESOLUTION- See Also:
-
TIFF_Y_RESOLUTION
public static final int TIFF_Y_RESOLUTION- See Also:
-
TIFF_PLANAR_CONFIGURATION
public static final int TIFF_PLANAR_CONFIGURATION- See Also:
-
TIFF_T4_OPTIONS
public static final int TIFF_T4_OPTIONS- See Also:
-
TIFF_T6_OPTIONS
public static final int TIFF_T6_OPTIONS- See Also:
-
TIFF_RESOLUTION_UNIT
public static final int TIFF_RESOLUTION_UNIT- See Also:
-
TIFF_PREDICTOR
public static final int TIFF_PREDICTOR- See Also:
-
TIFF_COLORMAP
public static final int TIFF_COLORMAP- See Also:
-
TIFF_TILE_WIDTH
public static final int TIFF_TILE_WIDTH- See Also:
-
TIFF_TILE_LENGTH
public static final int TIFF_TILE_LENGTH- See Also:
-
TIFF_TILE_OFFSETS
public static final int TIFF_TILE_OFFSETS- See Also:
-
TIFF_TILE_BYTE_COUNTS
public static final int TIFF_TILE_BYTE_COUNTS- See Also:
-
TIFF_EXTRA_SAMPLES
public static final int TIFF_EXTRA_SAMPLES- See Also:
-
TIFF_SAMPLE_FORMAT
public static final int TIFF_SAMPLE_FORMAT- See Also:
-
TIFF_S_MIN_SAMPLE_VALUE
public static final int TIFF_S_MIN_SAMPLE_VALUE- See Also:
-
TIFF_S_MAX_SAMPLE_VALUE
public static final int TIFF_S_MAX_SAMPLE_VALUE- See Also:
-
TIFF_ICC_PROFILE
public static final int TIFF_ICC_PROFILE- See Also:
-
-
Constructor Details
-
TIFFImageDecoder
-
-
Method Details
-
getNumPages
Description copied from class:ImageDecoderImpl
Returns 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:
getNumPages
in interfaceImageDecoder
- Overrides:
getNumPages
in classImageDecoderImpl
- Throws:
IOException
-
decodeAsRenderedImage
Description copied from class:ImageDecoderImpl
Returns aRenderedImage
that contains the decoded contents of theSeekableStream
associated 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:
decodeAsRenderedImage
in interfaceImageDecoder
- Specified by:
decodeAsRenderedImage
in classImageDecoderImpl
- Parameters:
page
- The page to be decoded.- Throws:
IOException
-