TIFFImage
Date: 2016-04-28

org.apache.xmlgraphics.image.codec.tiff

## Class TIFFImage

- java.lang.Object
- - org.apache.xmlgraphics.image.rendered.AbstractRed
  - - org.apache.xmlgraphics.image.codec.tiff.TIFFImage

- All Implemented Interfaces:
    java.awt.image.RenderedImage, CachableRed

      public class TIFFImage
      extends AbstractRed

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `COMP_DEFLATE`
    `static int` | `COMP_FAX_G3_1D`
    `static int` | `COMP_FAX_G3_2D`
    `static int` | `COMP_FAX_G4_2D`
    `static int` | `COMP_JPEG_OLD`
    `static int` | `COMP_JPEG_TTN2`
    `static int` | `COMP_LZW`
    `static int` | `COMP_NONE`
    `static int` | `COMP_PACKBITS`

    - ### Fields inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed

      `bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TIFFImage(SeekableStream stream, TIFFDecodeParam param, int directory)` Constructs a TIFFImage that acquires its data from a given SeekableStream and reads from a particular IFD of the stream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.image.WritableRaster` | `copyData(java.awt.image.WritableRaster wr)`
    `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.

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### 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

  - ### Constructor Detail

    - #### TIFFImage

          public TIFFImage(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.
      Parameters:
        `stream` - the SeekableStream to read from.
        `param` - an instance of TIFFDecodeParam, or null.
        `directory` - the index of the IFD to read from.
      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### 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.
      Throws:
        `java.io.IOException`

    - #### 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.
      Specified by:
        `getTile` in interface `java.awt.image.RenderedImage`
      Overrides:
        `getTile` in class `AbstractRed`