com.aspose.pdf.optimization

Class ImageCompressionOptions



  • public class ImageCompressionOptions
    extends Object

    Class contains set options for image compression.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean getCompressImages()
      If this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.
      int getEncoding()
      Gets or sets encoding used to store images.
      int getImageQuality()
      Specifies level of image compression when CompressIamges 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 resoultion is greater then specified MaxResolution parameter.
      int getVersion()
      Version of compression algorithm.
      void setCompressImages(boolean value)
      If this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.
      void setEncoding(int value)
      Gets or sets encoding used to store images.
      void setImageQuality(int value)
      Specifies level of image compression when CompressIamges 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 resoultion is greater then specified MaxResolution parameter.
      void setVersion(int value)
      Version of compression algorithm.
    • Constructor Detail

      • ImageCompressionOptions

        public ImageCompressionOptions()
    • Method Detail

      • getCompressImages

        public final boolean getCompressImages()

        If this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.

        Returns:
        boolean value
      • setCompressImages

        public final void setCompressImages(boolean value)

        If this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.

        Parameters:
        value - boolean value
      • getResizeImages

        public final boolean getResizeImages()

        If this flag set to true and CompressImages is true images will be resized if image resoultion is greater then specified MaxResolution parameter.

        Returns:
        boolean value
      • setResizeImages

        public final void setResizeImages(boolean value)

        If this flag set to true and CompressImages is true images will be resized if image resoultion is greater then specified MaxResolution parameter.

        Parameters:
        value - boolean value
      • getImageQuality

        public final int getImageQuality()

        Specifies level of image compression when CompressIamges flag is used.

        Returns:
        int value
      • setImageQuality

        public final void setImageQuality(int value)

        Specifies level of image compression when CompressIamges flag is used.

        Parameters:
        value - int value
      • getMaxResolution

        public final int getMaxResolution()

        Specifies maximum resolution of images. If image has higher resolition it will be scaled

        Returns:
        int value
      • setMaxResolution

        public final void setMaxResolution(int value)

        Specifies maximum resolution of images. If image has higher resolition it will be scaled

        Parameters:
        value - int value
      • getVersion

        public 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".

        Returns:
        int value
      • setVersion

        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".

        Parameters:
        value - int value
      • getEncoding

        public final int getEncoding()

        Gets or sets encoding used to store images.

        Returns:
        ImageEncoding element
      • setEncoding

        public final void setEncoding(int value)

        Gets or sets encoding used to store images.

        Parameters:
        value - ImageEncoding element