Package zombie.core.textures
Class PNGDecoder
java.lang.Object
zombie.core.textures.PNGDecoder
public class PNGDecoder
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPNGDecoder.Format -
Field Summary
-
Constructor Summary
Constructors Constructor Description PNGDecoder(java.io.InputStream input, boolean bDoMask) -
Method Summary
Modifier and Type Method Description PNGDecoder.FormatdecideTextureFormat(PNGDecoder.Format fmt)voiddecode(java.nio.ByteBuffer buffer, int stride, PNGDecoder.Format fmt)voiddecodeFlipped(java.nio.ByteBuffer buffer, int stride, PNGDecoder.Format fmt)intgetHeight()intgetWidth()booleanhasAlpha()booleanhasAlphaChannel()booleanisRGB()voidoverwriteTRNS(byte r, byte g, byte b)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
maskID
public int maskID -
mask
public boolean[] mask -
bDoMask
public boolean bDoMask -
readTotal
public long readTotal
-
-
Constructor Details
-
PNGDecoder
public PNGDecoder(java.io.InputStream input, boolean bDoMask) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Details
-
getHeight
public int getHeight() -
getWidth
public int getWidth() -
hasAlphaChannel
public boolean hasAlphaChannel() -
hasAlpha
public boolean hasAlpha() -
isRGB
public boolean isRGB() -
overwriteTRNS
public void overwriteTRNS(byte r, byte g, byte b) -
decideTextureFormat
-
decode
public void decode(java.nio.ByteBuffer buffer, int stride, PNGDecoder.Format fmt) throws java.io.IOException- Throws:
java.io.IOException
-
decodeFlipped
public void decodeFlipped(java.nio.ByteBuffer buffer, int stride, PNGDecoder.Format fmt) throws java.io.IOException- Throws:
java.io.IOException
-