public class ImageCompressionOptions extends Object
Class contains set options for image compression.
Constructor and Description |
---|
ImageCompressionOptions() |
Modifier and Type | Method and Description |
---|---|
int |
getEncoding()
Gets or sets encoding used to store images.
|
int |
getImageQuality()
Specifies level of image compression when CompressImages flag is used.
|
int |
getMaxResolution()
Specifies maximum resolution of images.
|
boolean |
getResizeImages()
If this flag set to true and CompressImages is true images will be resized
if image resolution is greater than specified MaxResolution parameter.
|
int |
getVersion()
Version of compression algorithm.
|
boolean |
isCompressImages()
If this flag is set to true images will be compressed in the document.
|
void |
setCompressImages(boolean value)
If this flag is set to true images will be compressed in the document.
|
void |
setEncoding(int value)
Gets or sets encoding used to store images.
|
void |
setImageQuality(int value)
Specifies level of image compression when CompressImages flag is used.
|
void |
setMaxResolution(int value)
Specifies maximum resolution of images.
|
void |
setResizeImages(boolean value)
If this flag set to true and CompressImages is true images will be resized
if image resolution is greater than specified MaxResolution parameter.
|
void |
setVersion(int value)
Version of compression algorithm.
|
public final boolean isCompressImages()
If this flag is set to true images will be compressed in the document. Compression level is specified with ImageQuality property.
public final void setCompressImages(boolean value)
If this flag is set to true images will be compressed in the document. Compression level is specified with ImageQuality property.
value
- boolean valuepublic final boolean getResizeImages()
If this flag set to true and CompressImages is true images will be resized if image resolution is greater than specified MaxResolution parameter.
public final void setResizeImages(boolean value)
If this flag set to true and CompressImages is true images will be resized if image resolution is greater than specified MaxResolution parameter.
value
- boolean valuepublic final int getImageQuality()
Specifies level of image compression when CompressImages flag is used.
public final void setImageQuality(int value)
Specifies level of image compression when CompressImages flag is used.
value
- int valuepublic final int getMaxResolution()
Specifies maximum resolution of images. If image has higher resolution it will be scaled
public final void setMaxResolution(int value)
Specifies maximum resolution of images. If image has higher resolution it will be scaled
value
- int valuepublic final int getVersion()
Version of compression algorithm. Possible values are: 1. standard compression, 2. fast (improved compression which is faster then standard but may be applicable not for all images), 3. mixed (standard compression is applied to images which can not be compressed by faster algorithm, this may give best compression but more slow then "fast" algorithm. Version "Fast" is not applicable for resizing images (standard method will be used). Default is "Standard".
public final void setVersion(int value)
Version of compression algorithm. Possible values are: 1. standard compression, 2. fast (improved compression which is faster then standard but may be applicable not for all images), 3. mixed (standard compression is applied to images which can not be compressed by faster algorithm, this may give best compression but more slow then "fast" algorithm. Version "Fast" is not applicable for resizing images (standard method will be used). Default is "Standard".
value
- int valuepublic final int getEncoding()
Gets or sets encoding used to store images.
public final void setEncoding(int value)
Gets or sets encoding used to store images.
value
- ImageEncoding elementCopyright © 2025 Aspose. All Rights Reserved.