Class PngImagingParameters
- java.lang.Object
-
- org.apache.commons.imaging.ImagingParameters
-
- org.apache.commons.imaging.common.XmpImagingParameters
-
- org.apache.commons.imaging.formats.png.PngImagingParameters
-
public class PngImagingParameters extends XmpImagingParameters
Png format parameters.- Since:
- 1.0-alpha3
-
-
Field Summary
Fields Modifier and Type Field Description static byte
DEFAULT_BIT_DEPTH
-
Constructor Summary
Constructors Constructor Description PngImagingParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getBitDepth()
PhysicalScale
getPhysicalScale()
List<? extends PngText>
getTextChunks()
boolean
isForceIndexedColor()
boolean
isForceTrueColor()
boolean
isPredictorEnabled()
Indicates that the PNG write operation should enable the predictor.void
setBitDepth(byte bitDepth)
void
setForceIndexedColor(boolean forceIndexedColor)
void
setForceTrueColor(boolean forceTrueColor)
void
setPhysicalScale(PhysicalScale physicalScale)
void
setPredictorEnabled(boolean predictorEnabled)
Sets the enabled status of the predictor.void
setTextChunks(List<? extends PngText> textChunks)
-
Methods inherited from class org.apache.commons.imaging.common.XmpImagingParameters
getXmpXml, setXmpXml
-
Methods inherited from class org.apache.commons.imaging.ImagingParameters
getBufferedImageFactory, getFileName, getPixelDensity, isStrict, setBufferedImageFactory, setFileName, setPixelDensity, setStrict
-
-
-
-
Field Detail
-
DEFAULT_BIT_DEPTH
public static final byte DEFAULT_BIT_DEPTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBitDepth
public byte getBitDepth()
-
setBitDepth
public void setBitDepth(byte bitDepth)
-
isForceIndexedColor
public boolean isForceIndexedColor()
-
setForceIndexedColor
public void setForceIndexedColor(boolean forceIndexedColor)
-
isForceTrueColor
public boolean isForceTrueColor()
-
setForceTrueColor
public void setForceTrueColor(boolean forceTrueColor)
-
getPhysicalScale
public PhysicalScale getPhysicalScale()
-
setPhysicalScale
public void setPhysicalScale(PhysicalScale physicalScale)
-
isPredictorEnabled
public boolean isPredictorEnabled()
Indicates that the PNG write operation should enable the predictor.- Returns:
- true if the predictor is enabled; otherwise, false.
-
setPredictorEnabled
public void 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.
-
-