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.BufferedImage
createImage(java.io.InputStream in, java.awt.Dimension size)
java.awt.Color
getBackground()
int
getBitDepth()
int
getColorType()
PngConfig
getConfig()
float
getGamma()
short[]
getGammaTable()
int
getHeight()
java.util.Map
getProperties()
java.lang.Object
getProperty(java.lang.String name)
int
getSamples()
TextChunk
getTextChunk(java.lang.String key)
int
getTransparency()
int
getWidth()
protected boolean
handlePass(java.awt.image.BufferedImage image, int pass)
protected boolean
handleProgress(java.awt.image.BufferedImage image, float pct)
protected void
handleWarning(PngException e)
boolean
isInterlaced()
protected boolean
isMultipleOK(int type)
java.awt.image.BufferedImage
read(java.io.File file)
java.awt.image.BufferedImage
read(java.io.InputStream in, boolean close)
protected void
readChunk(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:
getTransparency
in 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)
-