Package com.sixlegs.png
Class PngConfig
- java.lang.Object
-
- com.sixlegs.png.PngConfig
-
public final class PngConfig extends java.lang.ObjectCustomizable parameters used byPngImagewhen decoding an image. Instances of this class are immutable and can only be constructed using thePngConfig.Builderinner-class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPngConfig.BuilderBuilder class used to constructPngConfiginstances.
-
Field Summary
Fields Modifier and Type Field Description static intREAD_ALLRead the entire imagestatic intREAD_EXCEPT_DATARead the entire image, skipping over the image datastatic intREAD_EXCEPT_METADATARead the entire image, skipping over all non-critical chunks except tRNS and gAMAstatic intREAD_HEADERRead only the header chunkstatic intREAD_UNTIL_DATARead all the metadata up to the image data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetConvertIndexed()Return sthe current indexed image conversion setting.floatgetDefaultGamma()Returns the current default gamma value.floatgetDisplayExponent()Returns the current display exponent.booleangetGammaCorrect()Returns the current gamma correction setting.booleangetProgressive()Returns the current progressive display setting.intgetReadLimit()Returns the current read limit setting.booleangetReduce16()Returns the current 16-bit reduction setting.java.awt.RectanglegetSourceRegion()Returns the source region to be used.intgetSourceXSubsampling()Returns the number of source columns to advance for each pixel.intgetSourceYSubsampling()Returns the number of rows to advance for each pixel.intgetSubsamplingXOffset()Returns the horizontal offset of the subsampling grid.intgetSubsamplingYOffset()Returns the vertical offset of the subsampling grid.booleangetWarningsFatal()Returns whether warnings are treated as fatal errors.
-
-
-
Field Detail
-
READ_ALL
public static final int READ_ALL
Read the entire image- See Also:
- Constant Field Values
-
READ_HEADER
public static final int READ_HEADER
Read only the header chunk- See Also:
- Constant Field Values
-
READ_UNTIL_DATA
public static final int READ_UNTIL_DATA
Read all the metadata up to the image data- See Also:
- Constant Field Values
-
READ_EXCEPT_DATA
public static final int READ_EXCEPT_DATA
Read the entire image, skipping over the image data- See Also:
- Constant Field Values
-
READ_EXCEPT_METADATA
public static final int READ_EXCEPT_METADATA
Read the entire image, skipping over all non-critical chunks except tRNS and gAMA- See Also:
- Constant Field Values
-
-
Method Detail
-
getConvertIndexed
public boolean getConvertIndexed()
Return sthe current indexed image conversion setting.- See Also:
PngConfig.Builder.convertIndexed
-
getReduce16
public boolean getReduce16()
Returns the current 16-bit reduction setting.- See Also:
PngConfig.Builder.reduce16
-
getDefaultGamma
public float getDefaultGamma()
Returns the current default gamma value.- See Also:
PngConfig.Builder.defaultGamma
-
getGammaCorrect
public boolean getGammaCorrect()
Returns the current gamma correction setting.- See Also:
PngConfig.Builder.gammaCorrect
-
getProgressive
public boolean getProgressive()
Returns the current progressive display setting.- See Also:
PngConfig.Builder.progressive
-
getDisplayExponent
public float getDisplayExponent()
Returns the current display exponent.- See Also:
PngConfig.Builder.displayExponent
-
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:
PngConfig.Builder.readLimit
-
getWarningsFatal
public boolean getWarningsFatal()
Returns whether warnings are treated as fatal errors.- See Also:
PngConfig.Builder.warningsFatal
-
getSourceRegion
public java.awt.Rectangle getSourceRegion()
Returns the source region to be used.- See Also:
PngConfig.Builder.sourceRegion
-
getSourceXSubsampling
public int getSourceXSubsampling()
Returns the number of source columns to advance for each pixel.
-
getSourceYSubsampling
public int getSourceYSubsampling()
Returns the number of rows to advance for each pixel.
-
getSubsamplingXOffset
public int getSubsamplingXOffset()
Returns the horizontal offset of the subsampling grid.
-
getSubsamplingYOffset
public int getSubsamplingYOffset()
Returns the vertical offset of the subsampling grid.
-
-