public class ImageWriterParams
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
compressionMethod |
private Endianness |
endianness |
private java.lang.Boolean |
jpegForceBaseline |
private java.lang.Float |
jpegQuality |
static int |
ONE_ROW_PER_STRIP
Used for generating exactly one strip for each row
|
private ResolutionUnit |
resolutionUnit |
private int |
rowsPerStrip |
static int |
SINGLE_STRIP
Forces a single strip for the whole image.
|
private java.lang.Integer |
xResolution |
private java.lang.Integer |
yResolution |
Constructor and Description |
---|
ImageWriterParams()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCompressionMethod() |
Endianness |
getEndianness()
Returns the endianness selected for the image.
|
java.lang.Boolean |
getJPEGForceBaseline() |
java.lang.Float |
getJPEGQuality() |
java.lang.Integer |
getResolution() |
ResolutionUnit |
getResolutionUnit()
Returns the unit in which resolution values are given (ex.
|
int |
getRowsPerStrip()
The number of rows per strip of the TIFF image, default 1.
|
java.lang.Integer |
getXResolution() |
java.lang.Integer |
getYResolution() |
boolean |
hasResolution() |
boolean |
isSingleStrip()
Checks if image is single strip (required by some fax processors).
|
void |
setCompressionMethod(java.lang.String method)
Set the compression method that shall be used to encode the image.
|
void |
setEndianness(Endianness endianness)
Sets the endianness selected for the image.
|
void |
setJPEGQuality(float quality,
boolean forceBaseline)
Sets the quality setting for encoding JPEG images.
|
void |
setResolution(int resolution)
Sets the target resolution of the bitmap image to be written
(sets both the horizontal and vertical resolution to the same value).
|
void |
setResolutionUnit(ResolutionUnit resolutionUnit)
Sets the resolution unit of the image for calculating resolution.
|
void |
setRowsPerStrip(int rowsPerStrip)
Sets the rows per strip (default is one row per strip);
if set to -1 (single strip), will use height of the current page,
required by some fax processors.
|
void |
setSingleStrip(boolean isSingle)
Convenience method to set rows per strip to single strip,
otherwise sets to one row per strip.
|
void |
setXResolution(int resolution)
Sets the target horizontal resolution of the bitmap image to be written.
|
void |
setYResolution(int resolution)
Sets the target vertical resolution of the bitmap image to be written.
|
public static final int SINGLE_STRIP
public static final int ONE_ROW_PER_STRIP
private java.lang.Integer xResolution
private java.lang.Integer yResolution
private java.lang.Float jpegQuality
private java.lang.Boolean jpegForceBaseline
private java.lang.String compressionMethod
private ResolutionUnit resolutionUnit
private int rowsPerStrip
private Endianness endianness
public boolean hasResolution()
public java.lang.Integer getResolution()
public java.lang.Float getJPEGQuality()
public java.lang.Boolean getJPEGForceBaseline()
public java.lang.String getCompressionMethod()
public void setResolution(int resolution)
resolution
- the resolutionpublic void setJPEGQuality(float quality, boolean forceBaseline)
quality
- the quality setting (0.0-1.0)forceBaseline
- force baseline quantization tablepublic void setCompressionMethod(java.lang.String method)
method
- the compression methodpublic boolean isSingleStrip()
public void setSingleStrip(boolean isSingle)
isSingle
- true if a single strip shall be produced, false if multiple strips are okpublic void setRowsPerStrip(int rowsPerStrip)
rowsPerStrip
- the value to set.public int getRowsPerStrip()
public ResolutionUnit getResolutionUnit()
public void setResolutionUnit(ResolutionUnit resolutionUnit)
resolutionUnit
- the resolution unit (inches, centimeters etc.)public java.lang.Integer getXResolution()
public void setXResolution(int resolution)
resolution
- the resolution valuepublic java.lang.Integer getYResolution()
public void setYResolution(int resolution)
resolution
- the resolution valuepublic Endianness getEndianness()
public void setEndianness(Endianness endianness)
endianness
- the endianness