Class TiffImagingParameters
- java.lang.Object
-
- org.apache.commons.imaging.ImagingParameters
-
- org.apache.commons.imaging.common.XmpImagingParameters
-
- org.apache.commons.imaging.formats.tiff.TiffImagingParameters
-
public class TiffImagingParameters extends XmpImagingParameters
Tiff format parameters.- Since:
- 1.0-alpha3
-
-
Constructor Summary
Constructors Constructor Description TiffImagingParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearSubImage()Clears settings for sub-image.IntegergetCompression()PhotometricInterpretergetCustomPhotometricInterpreter()IntegergetLzwCompressionBlockSize()TiffOutputSetgetOutputSet()Get the TIFF output set for writing TIFF files.intgetSubImageHeight()Gets the height for a sub-image setting.intgetSubImageWidth()Gets the width for a sub-image setting.intgetSubImageX()Gets the X coordinate of a sub-image.intgetSubImageY()Gets the Y coordinate of a sub-image.IntegergetT4Options()IntegergetT6Options()booleanisReadThumbnails()booleanisSubImageSet()Indicates whether the application has set sub-image parameters.voidsetCompression(Integer compression)voidsetCustomPhotometricInterpreter(PhotometricInterpreter customPhotometricInterpreter)voidsetLzwCompressionBlockSize(Integer lzwCompressionBlockSize)voidsetOutputSet(TiffOutputSet tiffOutputSet)Set the TIFF output set for writing TIFF files.voidsetReadThumbnails(boolean readThumbnails)voidsetSubImage(int x, int y, int width, int height)Sets parameters for performing a partial read operation on an image.voidsetT4Options(Integer t4Options)voidsetT6Options(Integer t6Options)-
Methods inherited from class org.apache.commons.imaging.common.XmpImagingParameters
getXmpXml, setXmpXml
-
Methods inherited from class org.apache.commons.imaging.ImagingParameters
getBufferedImageFactory, getFileName, getPixelDensity, isStrict, setBufferedImageFactory, setFileName, setPixelDensity, setStrict
-
-
-
-
Method Detail
-
isReadThumbnails
public boolean isReadThumbnails()
-
setReadThumbnails
public void setReadThumbnails(boolean readThumbnails)
-
getOutputSet
public TiffOutputSet getOutputSet()
Get the TIFF output set for writing TIFF files.- Returns:
- if set, a valid instance; otherwise, a null reference.
-
setOutputSet
public void setOutputSet(TiffOutputSet tiffOutputSet)
Set the TIFF output set for writing TIFF files. An output set may contain various types of TiffDirectories including image directories, EXIF directories, GPS-related directories, etc.- Parameters:
tiffOutputSet- A valid instance.
-
setSubImage
public void setSubImage(int x, int y, int width, int height)Sets parameters for performing a partial read operation on an image. This method is useful for reducing memory and run-time overhead when accessing large source images.Note that the corner x and y coordinates must be positive integers (zero or greater). The width and height must be greater than zero.
- Parameters:
x- pixel coordinate of the upper-left corner of the source image, must be zero or greater.y- pixel coordinate of the upper-left corner of the source image, must be zero or greater.width- width of the image subset to be read, must be greater than zero.height- height of the image subset to be read, must be greater than zero.
-
clearSubImage
public void clearSubImage()
Clears settings for sub-image. Subsequent read operations will retrieve the entire image.
-
isSubImageSet
public boolean isSubImageSet()
Indicates whether the application has set sub-image parameters.- Returns:
- true if the sub-image parameters are set; otherwise, false.
-
getSubImageX
public int getSubImageX()
Gets the X coordinate of a sub-image. This setting is meaningful only if a sub-image is set.- Returns:
- a positive integer
-
getSubImageY
public int getSubImageY()
Gets the Y coordinate of a sub-image. This setting is meaningful only if a sub-image is set.- Returns:
- a positive integer
-
getSubImageWidth
public int getSubImageWidth()
Gets the width for a sub-image setting. For a sub-image setting to be meaningful, both the width and height must be set.- Returns:
- if the sub-image feature is enabled, a value greater than zero; otherwise, zero.
-
getSubImageHeight
public int getSubImageHeight()
Gets the height for a sub-image setting. For a sub-image setting to be meaningful, both the width and height must be set.- Returns:
- if the sub-image feature is enabled, a value greater than zero; otherwise, zero.
-
getCustomPhotometricInterpreter
public PhotometricInterpreter getCustomPhotometricInterpreter()
-
setCustomPhotometricInterpreter
public void setCustomPhotometricInterpreter(PhotometricInterpreter customPhotometricInterpreter)
-
getCompression
public Integer getCompression()
-
setCompression
public void setCompression(Integer compression)
-
getLzwCompressionBlockSize
public Integer getLzwCompressionBlockSize()
-
setLzwCompressionBlockSize
public void setLzwCompressionBlockSize(Integer lzwCompressionBlockSize)
-
getT4Options
public Integer getT4Options()
-
setT4Options
public void setT4Options(Integer t4Options)
-
getT6Options
public Integer getT6Options()
-
setT6Options
public void setT6Options(Integer t6Options)
-
-