Class PngImageOptions


  • public class PngImageOptions
    extends ImageOptions

    The settings for PNG output images

    For the output file name, it is recommended to use the file extension ".png".
    • Constructor Detail

      • PngImageOptions

        public PngImageOptions()
    • Method Detail

      • getBackground

        public BackgroundType getBackground()

        Combine a background with the image (Getter)

        This property allows a choice of which background to combine with the image.

        Default: BackgroundType.WHITE

      • setBackground

        public void setBackground​(BackgroundType value)

        Combine a background with the image (Setter)

        This property allows a choice of which background to combine with the image.

        Default: BackgroundType.WHITE

        Throws:
        java.lang.IllegalArgumentException - if value is null
      • getColorSpace

        public PngColorSpace getColorSpace()

        The color space of the output image (Getter)

        Get or set the color space.

        Default: PngColorSpace.RGB

      • setColorSpace

        public void setColorSpace​(PngColorSpace value)

        The color space of the output image (Setter)

        Get or set the color space.

        Default: PngColorSpace.RGB

        Throws:
        java.lang.IllegalArgumentException - if value is null
      • getBitsPerPixel

        public int getBitsPerPixel()

        The number of bits per pixel for indexed output (Getter)

        Get or set the index width used for indexed (palette) output. The value determines the maximum number of palette colors (2 to the power of the bits per pixel), and hence the file size. Valid values are 1, 2, 4 and 8.

        This property only applies when PngColorSpace.INDEXED is selected as the getColorSpace(); it is ignored for PngColorSpace.RGB and PngColorSpace.GRAY.

        Default: 8

      • setBitsPerPixel

        public void setBitsPerPixel​(int value)

        The number of bits per pixel for indexed output (Setter)

        Get or set the index width used for indexed (palette) output. The value determines the maximum number of palette colors (2 to the power of the bits per pixel), and hence the file size. Valid values are 1, 2, 4 and 8.

        This property only applies when PngColorSpace.INDEXED is selected as the getColorSpace(); it is ignored for PngColorSpace.RGB and PngColorSpace.GRAY.

        Default: 8

        Throws:
        java.lang.IllegalArgumentException - The given value is not one of 1, 2, 4 or 8.