java.lang.Object
javax.imageio.IIOParam
javax.imageio.ImageReadParam
javax.imageio.plugins.tiff.TIFFImageReadParam
public final 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.
Forcing reading of fields corresponding to TIFFTag
s
not in any of the allowed TIFFTagSet
s may be effected via
setReadUnknownTags
.
- Since:
- 9
-
Field Summary
Fields declared in class javax.imageio.ImageReadParam
canSetSourceRenderSize, destination, destinationBands, minProgressivePass, numProgressivePasses, sourceRenderSize
Fields declared in class javax.imageio.IIOParam
controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset
-
Constructor Summary
Constructors Constructor Description TIFFImageReadParam()
Constructs aTIFFImageReadParam
. -
Method Summary
Modifier and Type Method Description void
addAllowedTagSet(TIFFTagSet tagSet)
Adds aTIFFTagSet
object to the list of allowed tag sets.List<TIFFTagSet>
getAllowedTagSets()
Returns aList
containing the allowedTIFFTagSet
objects.boolean
getReadUnknownTags()
Retrieve the setting of whether to read fields corresponding to unknownTIFFTag
s.void
removeAllowedTagSet(TIFFTagSet tagSet)
Removes aTIFFTagSet
object from the list of allowed tag sets.void
setReadUnknownTags(boolean readUnknownTags)
Set whether to read fields corresponding toTIFFTag
s not in the allowedTIFFTagSet
s.Methods declared in class javax.imageio.ImageReadParam
canSetSourceRenderSize, getDestination, getDestinationBands, getSourceMaxProgressivePass, getSourceMinProgressivePass, getSourceNumProgressivePasses, getSourceRenderSize, setDestination, setDestinationBands, setSourceProgressivePasses, setSourceRenderSize
Methods declared in class javax.imageio.IIOParam
activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setDestinationType, setSourceBands, setSourceRegion, setSourceSubsampling
-
Constructor Details
-
TIFFImageReadParam
public TIFFImageReadParam()Constructs aTIFFImageReadParam
. Tags defined by theTIFFTagSet
sBaselineTIFFTagSet
,FaxTIFFTagSet
,ExifParentTIFFTagSet
, andGeoTIFFTagSet
will be supported.- See Also:
BaselineTIFFTagSet
,FaxTIFFTagSet
,ExifParentTIFFTagSet
,GeoTIFFTagSet
-
-
Method Details
-
addAllowedTagSet
Adds aTIFFTagSet
object to the list of allowed tag sets. Attempting to add a duplicate object to the list has no effect.- Parameters:
tagSet
- aTIFFTagSet
.- Throws:
IllegalArgumentException
- iftagSet
isnull
.
-
removeAllowedTagSet
Removes aTIFFTagSet
object from the list of allowed tag sets. Removal is based on theequals
method of theTIFFTagSet
, which is normally defined as reference equality.- Parameters:
tagSet
- aTIFFTagSet
.- Throws:
IllegalArgumentException
- iftagSet
isnull
.
-
getAllowedTagSets
Returns aList
containing the allowedTIFFTagSet
objects.- Returns:
- a
List
ofTIFFTagSet
s.
-
setReadUnknownTags
public void setReadUnknownTags(boolean readUnknownTags)Set whether to read fields corresponding toTIFFTag
s not in the allowedTIFFTagSet
s. The default setting isfalse
. If the TIFFImageReader
is ignoring metadata, then a setting oftrue
is overridden as all metadata are ignored except those essential to reading the image itself.- Parameters:
readUnknownTags
- Whether to read fields of unrecognized tags
-
getReadUnknownTags
public boolean getReadUnknownTags()Retrieve the setting of whether to read fields corresponding to unknownTIFFTag
s.- Returns:
- Whether to read fields of unrecognized tags
-