java.lang.Object | |
↳ | com.pdftron.pdf.Optimizer.MonoImageSettings |
A class that stores image downsampling/recompression settings for monochrome images.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_ccitt | CCITT group 4 compression | |||||||||
int | e_default | The constant e_default | |||||||||
int | e_flate | Flate compression | |||||||||
int | e_jbig2 | JBIG2 compression | |||||||||
int | e_none | No compression | |||||||||
int | e_off | The constant e_off |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MonoImageSettings()
create an MonoImageSettings object with default options
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
forceChanges(boolean force)
Sets whether image changes that grow the
PDF file should be kept.
| ||||||||||
void |
forceRecompression(boolean force)
Sets whether recompression to the specified compression
method should be forced when the image is not downsampled.
| ||||||||||
void |
setCompressionMode(int mode)
Sets the output compression mode for monochrome images
The default value is e_ccitt
| ||||||||||
void | setDownsampleMode(int mode) | ||||||||||
void |
setImageDPI(double maximum, double resampling)
Sets the maximum and resampling dpi for monochrome images.
| ||||||||||
void |
setJBIG2Threshold(double jbig2_threshold)
Sets the quality for lossy JBIG2Decode compression mode.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
CCITT group 4 compression
The constant e_default
Flate compression
JBIG2 compression
No compression
The constant e_off
create an MonoImageSettings object with default options
Sets whether image changes that grow the PDF file should be kept. This is off by default.
force | if true all image changes will be kept. |
---|
Sets whether recompression to the specified compression method should be forced when the image is not downsampled. By default the compression method for these images will not be changed.
force | if true the compression method for all images will be changed to the specified compression mode |
---|
Sets the output compression mode for monochrome images The default value is e_ccitt
mode | the compression mode to set |
---|
Sets the maximum and resampling dpi for monochrome images. By default these are set to 450 and 300 respectively.
maximum | the highest dpi of an image before it will be resampled |
---|---|
resampling | the image dpi to resample to if an image is encountered over the maximum dpi |
Sets the quality for lossy JBIG2Decode compression mode. The threshold is a floating point number in the range from 4 to 9 The default value for JBIG2 is 8.5. The setting is ignored for FLATE.