java.lang.Object | |
↳ | com.pdftron.pdf.Optimizer.ImageSettings |
A class that stores downsampling/recompression settings for color and grayscale images.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_default | The constant e_default | |||||||||
int | e_flate | The constant e_flate | |||||||||
int | e_jpeg | The constant e_jpeg | |||||||||
int | e_jpeg2000 | The constant e_jpeg2000 | |||||||||
int | e_none | The constant e_none | |||||||||
int | e_off | The constant e_off | |||||||||
int | e_retain | The constant e_retain |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ImageSettings()
create an ImageSettings 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) | ||||||||||
void | setDownsampleMode(int mode) | ||||||||||
void |
setImageDPI(double maximum, double resampling)
Sets the maximum and resampling dpi for images.
| ||||||||||
void |
setQuality(long quality)
Sets the quality for lossy compression modes
from 1 to 10 where 10 is lossless (if possible)
the default value is 5
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The constant e_default
The constant e_flate
The constant e_jpeg
The constant e_jpeg2000
The constant e_none
The constant e_off
The constant e_retain
create an ImageSettings 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 maximum and resampling dpi for images. By default these are set to 225 and 150 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 compression modes from 1 to 10 where 10 is lossless (if possible) the default value is 5