Package org.apache.commons.imaging.formats.png

# Class PngImagingParameters

java.lang.Object
org.apache.commons.imaging.ImagingParameters<PngImagingParameters>
org.apache.commons.imaging.common.XmpImagingParameters<PngImagingParameters>
org.apache.commons.imaging.formats.png.PngImagingParameters

public class PngImagingParameters extends XmpImagingParameters<PngImagingParameters>
PNG format parameters.

Since:
  1.0-alpha3

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final byte`
  `DEFAULT_BIT_DEPTH`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PngImagingParameters()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte`
  `getBitDepth()`
  `PhysicalScale`
  `getPhysicalScale()`
  `List<? extends AbstractPngText>`
  `getTextChunks()`
  `boolean`
  `isForceIndexedColor()`
  `boolean`
  `isForceTrueColor()`
  `boolean`
  `isPredictorEnabled()`
  Indicates that the PNG write operation should enable the predictor.
  `PngImagingParameters`
  `setBitDepth(byte bitDepth)`
  `PngImagingParameters`
  `setForceIndexedColor(boolean forceIndexedColor)`
  `PngImagingParameters`
  `setForceTrueColor(boolean forceTrueColor)`
  `PngImagingParameters`
  `setPhysicalScale(PhysicalScale physicalScale)`
  `PngImagingParameters`
  `setPredictorEnabled(boolean predictorEnabled)`
  Sets the enabled status of the predictor.
  `PngImagingParameters`
  `setTextChunks(List<? extends AbstractPngText> textChunks)`

  ### Methods inherited from class org.apache.commons.imaging.common.XmpImagingParameters

  `getXmpXml, setXmpXml`

  ### Methods inherited from class org.apache.commons.imaging.ImagingParameters

  `asThis, getBufferedImageFactory, getFileName, getPixelDensity, isStrict, setBufferedImageFactory, setFileName, setPixelDensity, setStrict`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_BIT_DEPTH

    public static final byte DEFAULT_BIT_DEPTH
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PngImagingParameters

    public PngImagingParameters()

- ## Method Details

  - ### getBitDepth

    public byte getBitDepth()

  - ### getPhysicalScale

    public PhysicalScale getPhysicalScale()

  - ### getTextChunks

    public List<? extends AbstractPngText> getTextChunks()

  - ### isForceIndexedColor

    public boolean isForceIndexedColor()

  - ### isForceTrueColor

    public boolean isForceTrueColor()

  - ### isPredictorEnabled

    public boolean isPredictorEnabled()
    Indicates that the PNG write operation should enable the predictor.
    Returns:
      true if the predictor is enabled; otherwise, false.

  - ### setBitDepth

    public PngImagingParameters setBitDepth(byte bitDepth)

  - ### setForceIndexedColor

    public PngImagingParameters setForceIndexedColor(boolean forceIndexedColor)

  - ### setForceTrueColor

    public PngImagingParameters setForceTrueColor(boolean forceTrueColor)

  - ### setPhysicalScale

    public PngImagingParameters setPhysicalScale(PhysicalScale physicalScale)

  - ### setPredictorEnabled

    public PngImagingParameters setPredictorEnabled(boolean predictorEnabled)
    Sets the enabled status of the predictor. When performing data compression on an image, a PNG predictor often results in a reduced file size. Predictors are particularly effective on photographic images, but may also work on graphics. The specification of a predictor may result in an increased processing time when writing an image, but will not affect the time required to read an image.
    Parameters:
      `predictorEnabled` - true if a predictor is enabled; otherwise, false.
    Returns:
      `this` instance.

  - ### setTextChunks

    public PngImagingParameters setTextChunks(List<? extends AbstractPngText> textChunks)