org.newdawn.slick.opengl
Class PNGDecoder
java.lang.Object
org.newdawn.slick.opengl.PNGDecoder
public class PNGDecoder
- extends java.lang.Object
A PNGDecoder. The slick PNG decoder is based on this class :)
- Author:
- Matthias Mann
Constructor Summary |
PNGDecoder(java.io.InputStream input)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALPHA
public static PNGDecoder.Format ALPHA
LUMINANCE
public static PNGDecoder.Format LUMINANCE
LUMINANCE_ALPHA
public static PNGDecoder.Format LUMINANCE_ALPHA
RGB
public static PNGDecoder.Format RGB
RGBA
public static PNGDecoder.Format RGBA
BGRA
public static PNGDecoder.Format BGRA
ABGR
public static PNGDecoder.Format ABGR
PNGDecoder
public PNGDecoder(java.io.InputStream input)
throws java.io.IOException
- Throws:
java.io.IOException
getHeight
public int getHeight()
getWidth
public int getWidth()
hasAlpha
public boolean hasAlpha()
isRGB
public boolean isRGB()
decideTextureFormat
public PNGDecoder.Format decideTextureFormat(PNGDecoder.Format fmt)
- Computes the implemented format conversion for the desired format.
- Parameters:
fmt
- the desired format
- Returns:
- format which best matches the desired format
- Throws:
java.lang.UnsupportedOperationException
- if this PNG file can't be decoded
decode
public void decode(java.nio.ByteBuffer buffer,
int stride,
PNGDecoder.Format fmt)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2006 New Dawn Software. All Rights Reserved.