public class PNGDecoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PNGDecoder.Format |
Modifier and Type | Field and Description |
---|---|
static PNGDecoder.Format |
ABGR |
static PNGDecoder.Format |
ALPHA |
static PNGDecoder.Format |
BGRA |
static PNGDecoder.Format |
LUMINANCE |
static PNGDecoder.Format |
LUMINANCE_ALPHA |
static PNGDecoder.Format |
RGB |
static PNGDecoder.Format |
RGBA |
Constructor and Description |
---|
PNGDecoder(java.io.InputStream input) |
Modifier and Type | Method and Description |
---|---|
PNGDecoder.Format |
decideTextureFormat(PNGDecoder.Format fmt)
Computes the implemented format conversion for the desired format.
|
void |
decode(java.nio.ByteBuffer buffer,
int stride,
PNGDecoder.Format fmt) |
int |
getHeight() |
int |
getWidth() |
boolean |
hasAlpha() |
boolean |
isRGB() |
public static PNGDecoder.Format ALPHA
public static PNGDecoder.Format LUMINANCE
public static PNGDecoder.Format LUMINANCE_ALPHA
public static PNGDecoder.Format RGB
public static PNGDecoder.Format RGBA
public static PNGDecoder.Format BGRA
public static PNGDecoder.Format ABGR
public PNGDecoder(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public int getHeight()
public int getWidth()
public boolean hasAlpha()
public boolean isRGB()
public PNGDecoder.Format decideTextureFormat(PNGDecoder.Format fmt)
fmt
- the desired formatjava.lang.UnsupportedOperationException
- if this PNG file can't be decodedpublic void decode(java.nio.ByteBuffer buffer, int stride, PNGDecoder.Format fmt) throws java.io.IOException
java.io.IOException