Package com.sixlegs.png
Class PngConfig
java.lang.Object
com.sixlegs.png.PngConfig
Customizable parameters used by
PngImage when decoding an image.
Instances of this class are immutable and can only be constructed
using the PngConfig.Builder inner-class.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class used to constructPngConfiginstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRead the entire imagestatic final intRead the entire image, skipping over the image datastatic final intRead the entire image, skipping over all non-critical chunks except tRNS and gAMAstatic final intRead only the header chunkstatic final intRead all the metadata up to the image data -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn sthe current indexed image conversion setting.floatReturns the current default gamma value.floatReturns the current display exponent.booleanReturns the current gamma correction setting.booleanReturns the current progressive display setting.intReturns the current read limit setting.booleanReturns the current 16-bit reduction setting.Returns the source region to be used.intReturns the number of source columns to advance for each pixel.intReturns the number of rows to advance for each pixel.intReturns the horizontal offset of the subsampling grid.intReturns the vertical offset of the subsampling grid.booleanReturns whether warnings are treated as fatal errors.
-
Field Details
-
READ_ALL
public static final int READ_ALLRead the entire image- See Also:
-
READ_HEADER
public static final int READ_HEADERRead only the header chunk- See Also:
-
READ_UNTIL_DATA
public static final int READ_UNTIL_DATARead all the metadata up to the image data- See Also:
-
READ_EXCEPT_DATA
public static final int READ_EXCEPT_DATARead the entire image, skipping over the image data- See Also:
-
READ_EXCEPT_METADATA
public static final int READ_EXCEPT_METADATARead the entire image, skipping over all non-critical chunks except tRNS and gAMA- See Also:
-
-
Method Details
-
getConvertIndexed
public boolean getConvertIndexed()Return sthe current indexed image conversion setting.- See Also:
-
getReduce16
public boolean getReduce16()Returns the current 16-bit reduction setting.- See Also:
-
getDefaultGamma
public float getDefaultGamma()Returns the current default gamma value.- See Also:
-
getGammaCorrect
public boolean getGammaCorrect()Returns the current gamma correction setting.- See Also:
-
getProgressive
public boolean getProgressive()Returns the current progressive display setting.- See Also:
-
getDisplayExponent
public float getDisplayExponent()Returns the current display exponent.- See Also:
-
getReadLimit
public int getReadLimit()Returns the current read limit setting.- Returns:
- one of
READ_ALL,
READ_HEADER,
READ_UNTIL_DATA,
READ_EXCEPT_DATA,
orREAD_EXCEPT_METADATA - See Also:
-
getWarningsFatal
public boolean getWarningsFatal()Returns whether warnings are treated as fatal errors.- See Also:
-
getSourceRegion
Returns the source region to be used.- See Also:
-
getSourceXSubsampling
public int getSourceXSubsampling()Returns the number of source columns to advance for each pixel.- See Also:
-
getSourceYSubsampling
public int getSourceYSubsampling()Returns the number of rows to advance for each pixel.- See Also:
-
getSubsamplingXOffset
public int getSubsamplingXOffset()Returns the horizontal offset of the subsampling grid.- See Also:
-
getSubsamplingYOffset
public int getSubsamplingYOffset()Returns the vertical offset of the subsampling grid.- See Also:
-