Package com.pdftools.pdf2image
Class JpegImageOptions
java.lang.Object
com.pdftools.internal.NativeBase
com.pdftools.internal.NativeObject
com.pdftools.pdf2image.ImageOptions
com.pdftools.pdf2image.JpegImageOptions
The settings for JPEG output images
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe color space of the output image (Getter)intThe JPEG quality factor (Getter)voidsetColorSpace(JpegColorSpace value) The color space of the output image (Setter)voidsetJpegQuality(int value) The JPEG quality factor (Setter)Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Constructor Details
-
JpegImageOptions
public JpegImageOptions()
-
-
Method Details
-
getColorSpace
The color space of the output image (Getter)
Get or set the color space of the image. If
null, the blending color space of the page is used.Default:
JpegColorSpace.RGB -
setColorSpace
The color space of the output image (Setter)
Get or set the color space of the image. If
null, the blending color space of the page is used.Default:
JpegColorSpace.RGB -
getJpegQuality
public int getJpegQuality()The JPEG quality factor (Getter)
Get or set the JPEG compression quality. Valid values are 1, or 100, or in between.
Default:
85 -
setJpegQuality
public void setJpegQuality(int value) The JPEG quality factor (Setter)
Get or set the JPEG compression quality. Valid values are 1, or 100, or in between.
Default:
85- Throws:
IllegalArgumentException- The given value is smaller than 1 or greater than 100.
-