Package com.sixlegs.png
Class PngImage
java.lang.Object
com.sixlegs.png.PngImage
- All Implemented Interfaces:
java.awt.Transparency
public class PngImage
extends java.lang.Object
implements java.awt.Transparency
-
Field Summary
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected java.awt.image.BufferedImagecreateImage(java.io.InputStream in, java.awt.Dimension size)java.awt.ColorgetBackground()intgetBitDepth()intgetColorType()PngConfiggetConfig()floatgetGamma()short[]getGammaTable()intgetHeight()java.util.MapgetProperties()java.lang.ObjectgetProperty(java.lang.String name)intgetSamples()TextChunkgetTextChunk(java.lang.String key)intgetTransparency()intgetWidth()protected booleanhandlePass(java.awt.image.BufferedImage image, int pass)protected booleanhandleProgress(java.awt.image.BufferedImage image, float pct)protected voidhandleWarning(PngException e)booleanisInterlaced()protected booleanisMultipleOK(int type)java.awt.image.BufferedImageread(java.io.File file)java.awt.image.BufferedImageread(java.io.InputStream in, boolean close)protected voidreadChunk(int type, java.io.DataInput in, long offset, int length)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PngImage
public PngImage() -
PngImage
-
-
Method Details
-
getConfig
-
read
public java.awt.image.BufferedImage read(java.io.File file) throws java.io.IOException- Throws:
java.io.IOException
-
read
public java.awt.image.BufferedImage read(java.io.InputStream in, boolean close) throws java.io.IOException- Throws:
java.io.IOException
-
createImage
protected java.awt.image.BufferedImage createImage(java.io.InputStream in, java.awt.Dimension size) throws java.io.IOException- Throws:
java.io.IOException
-
handlePass
protected boolean handlePass(java.awt.image.BufferedImage image, int pass) -
handleProgress
protected boolean handleProgress(java.awt.image.BufferedImage image, float pct) -
handleWarning
- Throws:
PngException
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getBitDepth
public int getBitDepth() -
isInterlaced
public boolean isInterlaced() -
getColorType
public int getColorType() -
getTransparency
public int getTransparency()- Specified by:
getTransparencyin interfacejava.awt.Transparency
-
getSamples
public int getSamples() -
getGamma
public float getGamma() -
getGammaTable
public short[] getGammaTable() -
getBackground
public java.awt.Color getBackground() -
getProperty
public java.lang.Object getProperty(java.lang.String name) -
getProperties
public java.util.Map getProperties() -
getTextChunk
-
readChunk
protected void readChunk(int type, java.io.DataInput in, long offset, int length) throws java.io.IOException- Throws:
java.io.IOException
-
isMultipleOK
protected boolean isMultipleOK(int type)
-