APIdia Launch Partner
Top Description Fields Constructors Methods
javax.imageio.plugins.tiff

public final Class TIFFImageReadParam

extends ImageReadParam
Class Inheritance
Imports
java.util.ArrayList, .List, javax.imageio.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 TIFFTagSets. 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.

Forcing reading of fields corresponding to TIFFTags not in any of the allowed TIFFTagSets may be effected via setReadUnknownTags.

Since
9

Field Summary

Modifier and TypeField and Description
private final List<TIFFTagSet>
private boolean
Inherited from javax.imageio.ImageReadParam:
canSetSourceRenderSizedestinationdestinationBandsminProgressivePassnumProgressivePassessourceRenderSize

Constructor Summary

AccessConstructor and Description
public
TIFFImageReadParam()

Constructs a TIFFImageReadParam.

Method Summary

Modifier and TypeMethod and Description
public void
addAllowedTagSet(TIFFTagSet
a TIFFTagSet.
tagSet
)

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

public List<TIFFTagSet>

Returns:

a List of TIFFTagSets.
getAllowedTagSets
()

Returns a List containing the allowed TIFFTagSet objects.

public boolean

Returns:

Whether to read fields of unrecognized tags
getReadUnknownTags
()

Retrieve the setting of whether to read fields corresponding to unknown TIFFTags.

public void
removeAllowedTagSet(TIFFTagSet
a TIFFTagSet.
tagSet
)

Removes a TIFFTagSet object from the list of allowed tag sets.

public void
setReadUnknownTags(boolean
Whether to read fields of unrecognized tags
readUnknownTags
)

Set whether to read fields corresponding to TIFFTags not in the allowed TIFFTagSets.

Inherited from javax.imageio.ImageReadParam:
canSetSourceRenderSizegetDestinationgetDestinationBandsgetSourceMaxProgressivePassgetSourceMinProgressivePassgetSourceNumProgressivePassesgetSourceRenderSizesetDestinationsetDestinationBandssetDestinationTypesetSourceProgressivePassessetSourceRenderSize

Field Detail

allowedTagSetsback to summary
private final List<TIFFTagSet> allowedTagSets
readUnknownTagsback to summary
private boolean readUnknownTags

Constructor Detail

TIFFImageReadParamback to summary
public TIFFImageReadParam()

Constructs a TIFFImageReadParam. Tags defined by the TIFFTagSets BaselineTIFFTagSet, FaxTIFFTagSet, ExifParentTIFFTagSet, and GeoTIFFTagSet will be supported.

See Also
BaselineTIFFTagSet, FaxTIFFTagSet, ExifParentTIFFTagSet, GeoTIFFTagSet

Method Detail

addAllowedTagSetback to summary
public void addAllowedTagSet(TIFFTagSet tagSet)

Adds a TIFFTagSet object to the list of allowed tag sets. Attempting to add a duplicate object to the list has no effect.

Parameters
tagSet:TIFFTagSet

a TIFFTagSet.

Exceptions
IllegalArgumentException:
if tagSet is null.
getAllowedTagSetsback to summary
public List<TIFFTagSet> getAllowedTagSets()

Returns a List containing the allowed TIFFTagSet objects.

Returns:List<TIFFTagSet>

a List of TIFFTagSets.

getReadUnknownTagsback to summary
public boolean getReadUnknownTags()

Retrieve the setting of whether to read fields corresponding to unknown TIFFTags.

Returns:boolean

Whether to read fields of unrecognized tags

removeAllowedTagSetback to summary
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:TIFFTagSet

a TIFFTagSet.

Exceptions
IllegalArgumentException:
if tagSet is null.
setReadUnknownTagsback to summary
public void setReadUnknownTags(boolean readUnknownTags)

Set whether to read fields corresponding to TIFFTags not in the allowed TIFFTagSets. The default setting is false. If the TIFF ImageReader is ignoring metadata, then a setting of true is overridden as all metadata are ignored except those essential to reading the image itself.

Parameters
readUnknownTags:boolean

Whether to read fields of unrecognized tags