public class JpegImageOptions extends ImageOptions
JPEG images use a lossy compression algorithm that provides a high compression ratio. It is best suited for photographs and content with little or no text.
For the output file name, it is recommended to use the file extension ".jpg".
| Constructor | Description |
|---|---|
JpegImageOptions() |
| Modifier and Type | Method | Description |
|---|---|---|
JpegColorSpace |
getColorSpace() |
The color space of the output image (Getter)
|
int |
getJpegQuality() |
The JPEG quality factor (Getter)
|
void |
setColorSpace(JpegColorSpace value) |
The color space of the output image (Setter)
|
void |
setJpegQuality(int value) |
The JPEG quality factor (Setter)
|
equals, hashCodepublic JpegColorSpace getColorSpace()
Get or set the color space of the image.
If null, the blending color space of the page is used.
Default: JpegColorSpace.RGB
public void setColorSpace(JpegColorSpace value)
Get or set the color space of the image.
If null, the blending color space of the page is used.
Default: JpegColorSpace.RGB
public int getJpegQuality()
Get or set the JPEG compression quality. Valid values are 1, or 100, or in between.
Default: 85
public void setJpegQuality(int value)
Get or set the JPEG compression quality. Valid values are 1, or 100, or in between.
Default: 85
java.lang.IllegalArgumentException - The given value is smaller than 1 or greater than 100.