Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.media.imageio.plugins.tiff
Class TIFFImageReadParam

    java.lang.Object
      |
      +--javax.imageio.IIOParam
            |
            +--javax.imageio.ImageReadParam
                  |
                  +--com.sun.media.imageio.plugins.tiff.TIFFImageReadParam

public class TIFFImageReadParam
extends ImageReadParam

A subclass of `ImageReadParam` allowing control over the TIFF reading process.

Because TIFF is an extensible format, the reader requires information about any tags used by TIFF extensions in order to emit meaningful metadata. Also, TIFF extensions may define new compression types. Both types of information about extensions may be provided by this interface.

Additional TIFF tags must be organized into `TIFFTagSet`s. A `TIFFTagSet` may be provided to the reader by means of the `addAllowedTagSet` method. By default, the tag sets `BaselineTIFFTagSet`, `FaxTIFFTagSet`, `EXIFParentTIFFTagSet`, and `GeoTIFFTagSet` are included.

New TIFF decompressors are handled in a simple fashion. If a non-`null` `TIFFDecompressor` is provided by means of the setTIFFDecompressor method, it will override the reader's usual choice of decompressor. Thus, to read an image with a non-standard compression type, the application should first attempt to read the image's metadata and extract the compression type. The application may then use its own logic to choose a suitable `TIFFDecompressor`, instantiate it, and pass it to the `ImageReadParam` being used. The reader's `read` method may be called with the `ImageReadParam` set.

Field Summary

Fields inherited from class javax.imageio.ImageReadParam
`canSetSourceRenderSize, destination, destinationBands, minProgressivePass, numProgressivePasses, sourceRenderSize`

Fields inherited from class javax.imageio.IIOParam
`controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset`

Constructor Summary
`TIFFImageReadParam()` Constructs a `TIFFImageReadParam`.

Method Summary
`void` | `addAllowedTagSet(TIFFTagSet tagSet)` Adds a `TIFFTagSet` object to the list of allowed tag sets.
`List` | `getAllowedTagSets()` Returns a `List` containing the allowed `TIFFTagSet` objects.
`TIFFColorConverter` | `getColorConverter()` Returns the currently set `TIFFColorConverter` object, or `null` if none is set.
`TIFFDecompressor` | `getTIFFDecompressor()` Returns the `TIFFDecompressor` that is currently set to be used by the `ImageReader` to decode each image strip or tile, or `null` if none has been set.
`void` | `removeAllowedTagSet(TIFFTagSet tagSet)` Removes a `TIFFTagSet` object from the list of allowed tag sets.
`void` | `setColorConverter(TIFFColorConverter colorConverter)` Sets the `TIFFColorConverter` object for the pixel data being read.
`void` | `setTIFFDecompressor(TIFFDecompressor decompressor)` Sets the `TIFFDecompressor` object to be used by the `ImageReader` to decode each image strip or tile.

Methods inherited from class javax.imageio.ImageReadParam
`canSetSourceRenderSize, getDestination, getDestinationBands, getSourceMaxProgressivePass, getSourceMinProgressivePass, getSourceNumProgressivePasses, getSourceRenderSize, setDestination, setDestinationBands, setDestinationType, setSourceProgressivePasses, setSourceRenderSize`

Methods inherited from class javax.imageio.IIOParam
`activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setSourceBands, setSourceRegion, setSourceSubsampling`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TIFFImageReadParam

    public TIFFImageReadParam()

  Constructs a `TIFFImageReadParam`. Tags defined by the `TIFFTagSet`s `BaselineTIFFTagSet`, `FaxTIFFTagSet`, `EXIFParentTIFFTagSet`, and `GeoTIFFTagSet` will be supported.

See Also:
  `BaselineTIFFTagSet`, `FaxTIFFTagSet`, `EXIFParentTIFFTagSet`, `GeoTIFFTagSet`

Method Detail

### addAllowedTagSet

    public void addAllowedTagSet(TIFFTagSet tagSet)

  Adds a `TIFFTagSet` object to the list of allowed tag sets.

  Parameters:
    `tagSet` - a `TIFFTagSet`.
  Throws:
    `IllegalArgumentException` - if `tagSet` is `null`.

### removeAllowedTagSet

    public void removeAllowedTagSet(TIFFTagSet tagSet)

  Removes a `TIFFTagSet` object from the list of allowed tag sets. Removal is based on the `equals` method of the `TIFFTagSet`, which is normally defined as reference equality.

  Parameters:
    `tagSet` - a `TIFFTagSet`.
  Throws:
    `IllegalArgumentException` - if `tagSet` is `null`.

### getAllowedTagSets

    public List getAllowedTagSets()

  Returns a `List` containing the allowed `TIFFTagSet` objects.

  Returns:
    a `List` of `TIFFTagSet`s.

### setTIFFDecompressor

    public void setTIFFDecompressor(TIFFDecompressor decompressor)

  Sets the `TIFFDecompressor` object to be used by the `ImageReader` to decode each image strip or tile. A value of `null` allows the reader to choose its own TIFFDecompressor.

  Parameters:
    `decompressor` - the `TIFFDecompressor` to be used for decoding, or `null` to allow the reader to choose its own.
  See Also:
    `getTIFFDecompressor()`

### getTIFFDecompressor

    public TIFFDecompressor getTIFFDecompressor()

  Returns the `TIFFDecompressor` that is currently set to be used by the `ImageReader` to decode each image strip or tile, or `null` if none has been set.

  Returns:
    decompressor the `TIFFDecompressor` to be used for decoding, or `null` if none has been set (allowing the reader to choose its own).
  See Also:
    `setTIFFDecompressor(TIFFDecompressor)`

### setColorConverter

    public void setColorConverter(TIFFColorConverter colorConverter)

  Sets the `TIFFColorConverter` object for the pixel data being read. The data will be converted from the given color space to a standard RGB space as it is being read. A value of `null` disables conversion.

  Parameters:
    `colorConverter` - a `TIFFColorConverter` object to be used for final color conversion, or `null`.
  See Also:
    `getColorConverter()`

### getColorConverter

    public TIFFColorConverter getColorConverter()

  Returns the currently set `TIFFColorConverter` object, or `null` if none is set.

  Returns:
    the current `TIFFColorConverter` object.
  See Also:
    `setColorConverter(TIFFColorConverter)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD