Class SaveImageOptions


  • public class SaveImageOptions
    extends java.lang.Object
    Options for saving image to a path.
    • Constructor Summary

      Constructors 
      Constructor Description
      SaveImageOptions()
      Constructs SaveImageOptions with default parameters.
      SaveImageOptions​(int quality, boolean optimize)
      Constructs SaveImageOptions with the given params.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getOptimize()
      Getter for optimize field.
      int getQuality()
      Getter for quality field.
      void setOptimize​(boolean optimize)
      Setter for optimize field.
      void setQuality​(int quality)
      Setter for quality field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SaveImageOptions

        public SaveImageOptions​(int quality,
                                boolean optimize)
        Constructs SaveImageOptions with the given params.
        Parameters:
        quality - Quality parameter is for JPEG only and is in range 0 to 100. If -1, then the value from hibernation is used. In case the ImageRef was created in lazy load-mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by decoding the JPEG and then re-encoding it. Default is -1
        optimize - If `true`, the encoder will spend extra time when saving JPEG files to improve the compression rate. Enabling this option has no impact on quality. Default is false
      • SaveImageOptions

        public SaveImageOptions()
        Constructs SaveImageOptions with default parameters.
    • Method Detail

      • getQuality

        public int getQuality()
        Getter for quality field. See constructor documentation for more information about the field.
        Returns:
        quality
      • setQuality

        public void setQuality​(int quality)
        Setter for quality field. See constructor documentation for more information about the field.
        Parameters:
        quality - Value to set.
      • getOptimize

        public boolean getOptimize()
        Getter for optimize field. See constructor documentation for more information about the field.
        Returns:
        optimize
      • setOptimize

        public void setOptimize​(boolean optimize)
        Setter for optimize field. See constructor documentation for more information about the field.
        Parameters:
        optimize - Value to set.