public class ImageCompression extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESSION_DEFLATE
Use Deflate compression when saving images to the PDF document.
|
static int |
COMPRESSION_JBIG2
Use JBIG2 compression when saving images to the PDF document.
|
static int |
COMPRESSION_JPEG
Use JPEG compression when saving images to the PDF document.
|
static int |
COMPRESSION_JPEG2000
Use Jpeg2000 compression when saving images to the PDF document.
|
Constructor and Description |
---|
ImageCompression()
Constructs a default image parameters object.
|
ImageCompression(int compression)
Constructs an ImageSettings object with the given compression type.
|
ImageCompression(int compression,
float quality)
Constructs an ImageSettings object with the given compression type and quality setting.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones this object.
|
int |
getCompression()
Gets the compression type used when writing images to the PDF document.
|
float |
getQuality()
Gets the current quality settings.
|
void |
setCompression(int compression)
Sets the compression type used when writing images to the PDF document.
|
void |
setQuality(float quality)
Sets the current quality setting.
|
public static final int COMPRESSION_DEFLATE
public static final int COMPRESSION_JPEG
public static final int COMPRESSION_JBIG2
public static final int COMPRESSION_JPEG2000
public ImageCompression()
public ImageCompression(int compression)
compression
- The type of compression.public ImageCompression(int compression, float quality)
compression
- The type of compression.quality
- The quality setting.public int getCompression()
public void setCompression(int compression)
compression
- The new compression type.public float getQuality()
public void setQuality(float quality)
quality
- The new compression quality. The value will be bounded to >= 0.1 and <= 1.0