org.apache.batik.ext.awt.image.codec.tiff
Class TIFFImageDecoder

java.lang.Object
  |
  +--org.apache.batik.ext.awt.image.codec.ImageDecoderImpl
        |
        +--org.apache.batik.ext.awt.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
static int TIFF_BITS_PER_SAMPLE
           
static int TIFF_COLORMAP
           
static int TIFF_COMPRESSION
           
static int TIFF_EXTRA_SAMPLES
           
static int TIFF_FILL_ORDER
           
static int TIFF_IMAGE_LENGTH
           
static int TIFF_IMAGE_WIDTH
           
static int TIFF_PHOTOMETRIC_INTERPRETATION
           
static int TIFF_PLANAR_CONFIGURATION
           
static int TIFF_PREDICTOR
           
static int TIFF_RESOLUTION_UNIT
           
static int TIFF_ROWS_PER_STRIP
           
static int TIFF_S_MAX_SAMPLE_VALUE
           
static int TIFF_S_MIN_SAMPLE_VALUE
           
static int TIFF_SAMPLE_FORMAT
           
static int TIFF_SAMPLES_PER_PIXEL
           
static int TIFF_STRIP_BYTE_COUNTS
           
static int TIFF_STRIP_OFFSETS
           
static int TIFF_T4_OPTIONS
           
static int TIFF_T6_OPTIONS
           
static int TIFF_TILE_BYTE_COUNTS
           
static int TIFF_TILE_LENGTH
           
static int TIFF_TILE_OFFSETS
           
static int TIFF_TILE_WIDTH
           
static int TIFF_X_RESOLUTION
           
static int TIFF_Y_RESOLUTION
           
 
Fields inherited from class org.apache.batik.ext.awt.image.codec.ImageDecoderImpl
input, param
 
Constructor Summary
TIFFImageDecoder(SeekableStream input, ImageDecodeParam param)
           
 
Method Summary
 java.awt.image.RenderedImage decodeAsRenderedImage(int page)
          Returns a RenderedImage that contains the decoded contents of the SeekableStream associated with this ImageDecoder.
 int getNumPages()
          Returns the number of pages present in the current stream.
 
Methods inherited from class org.apache.batik.ext.awt.image.codec.ImageDecoderImpl
decodeAsRaster, decodeAsRaster, decodeAsRenderedImage, getInputStream, getParam, setParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIFF_IMAGE_WIDTH

public static final int TIFF_IMAGE_WIDTH

TIFF_IMAGE_LENGTH

public static final int TIFF_IMAGE_LENGTH

TIFF_BITS_PER_SAMPLE

public static final int TIFF_BITS_PER_SAMPLE

TIFF_COMPRESSION

public static final int TIFF_COMPRESSION

TIFF_PHOTOMETRIC_INTERPRETATION

public static final int TIFF_PHOTOMETRIC_INTERPRETATION

TIFF_FILL_ORDER

public static final int TIFF_FILL_ORDER

TIFF_STRIP_OFFSETS

public static final int TIFF_STRIP_OFFSETS

TIFF_SAMPLES_PER_PIXEL

public static final int TIFF_SAMPLES_PER_PIXEL

TIFF_ROWS_PER_STRIP

public static final int TIFF_ROWS_PER_STRIP

TIFF_STRIP_BYTE_COUNTS

public static final int TIFF_STRIP_BYTE_COUNTS

TIFF_X_RESOLUTION

public static final int TIFF_X_RESOLUTION

TIFF_Y_RESOLUTION

public static final int TIFF_Y_RESOLUTION

TIFF_PLANAR_CONFIGURATION

public static final int TIFF_PLANAR_CONFIGURATION

TIFF_T4_OPTIONS

public static final int TIFF_T4_OPTIONS

TIFF_T6_OPTIONS

public static final int TIFF_T6_OPTIONS

TIFF_RESOLUTION_UNIT

public static final int TIFF_RESOLUTION_UNIT

TIFF_PREDICTOR

public static final int TIFF_PREDICTOR

TIFF_COLORMAP

public static final int TIFF_COLORMAP

TIFF_TILE_WIDTH

public static final int TIFF_TILE_WIDTH

TIFF_TILE_LENGTH

public static final int TIFF_TILE_LENGTH

TIFF_TILE_OFFSETS

public static final int TIFF_TILE_OFFSETS

TIFF_TILE_BYTE_COUNTS

public static final int TIFF_TILE_BYTE_COUNTS

TIFF_EXTRA_SAMPLES

public static final int TIFF_EXTRA_SAMPLES

TIFF_SAMPLE_FORMAT

public static final int TIFF_SAMPLE_FORMAT

TIFF_S_MIN_SAMPLE_VALUE

public static final int TIFF_S_MIN_SAMPLE_VALUE

TIFF_S_MAX_SAMPLE_VALUE

public static final int TIFF_S_MAX_SAMPLE_VALUE
Constructor Detail

TIFFImageDecoder

public TIFFImageDecoder(SeekableStream input,
                        ImageDecodeParam param)
Method Detail

getNumPages

public int getNumPages()
                throws java.io.IOException
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.
Overrides:
getNumPages in class ImageDecoderImpl

decodeAsRenderedImage

public java.awt.image.RenderedImage decodeAsRenderedImage(int page)
                                                   throws java.io.IOException
Description copied from class: ImageDecoderImpl
Returns a RenderedImage that contains the decoded contents of the SeekableStream associated with this ImageDecoder. 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.
Overrides:
decodeAsRenderedImage in class ImageDecoderImpl
Following copied from class: org.apache.batik.ext.awt.image.codec.ImageDecoderImpl
Parameters:
page - The page to be decoded.


Copyright © 2002 Apache Software Foundation. All Rights Reserved.