public static class Optimizer.ImageSettings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
e_default
The constant e_default
|
static int |
e_flate
The constant e_flate
|
static int |
e_jpeg
The constant e_jpeg
|
static int |
e_jpeg2000
The constant e_jpeg2000
|
static int |
e_none
The constant e_none
|
static int |
e_off
The constant e_off
|
static int |
e_retain
The constant e_retain
|
Constructor and Description |
---|
ImageSettings()
create an ImageSettings object with default options
|
Modifier and Type | Method and Description |
---|---|
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
|
public static final int e_retain
public static final int e_flate
public static final int e_jpeg
public static final int e_jpeg2000
public static final int e_none
public static final int e_off
public static final int e_default
public ImageSettings()
public void setImageDPI(double maximum, double resampling)
maximum
- the highest dpi of an image before it will be resampledresampling
- the image dpi to resample to if an image is encountered over the maximum dpipublic void setCompressionMode(int mode)
public void setDownsampleMode(int mode)
public void setQuality(long quality)
public void forceRecompression(boolean force)
force
- if true the compression method for all images will be changed to the specified compression modepublic void forceChanges(boolean force)
force
- if true all image changes will be kept.