|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.image.util.DDSLoader.DDSReader
public static class DDSLoader.DDSReader
DDS reader
| Constructor Summary | |
|---|---|
DDSLoader.DDSReader(java.io.InputStream in)
|
|
| Method Summary | |
|---|---|
byte[] |
flipData(byte[] data,
int scanlineSize,
int height)
Flips the given image data on the Y axis. |
void |
loadHeader()
Reads the header (first 128 bytes) of a DDS File |
java.util.ArrayList<java.nio.ByteBuffer> |
readData(boolean flip)
Reads the image data from the InputStream in the required format. |
java.nio.ByteBuffer |
readDXT2D(int totalSize)
Reads a DXT compressed image from the InputStream |
java.nio.ByteBuffer |
readGrayscale2D(boolean flip,
int totalSize)
Reads a grayscale image with mipmaps from the InputStream |
java.nio.ByteBuffer |
readRGB2D(boolean flip,
int totalSize)
Reads an uncompressed RGB or RGBA image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DDSLoader.DDSReader(java.io.InputStream in)
| Method Detail |
|---|
public void loadHeader()
throws java.io.IOException
java.io.IOException
public byte[] flipData(byte[] data,
int scanlineSize,
int height)
data - Data array containing image data (without mipmaps)scanlineSize - Size of a single scanline = width * bytesPerPixelheight - Height of the image in pixels
public java.nio.ByteBuffer readGrayscale2D(boolean flip,
int totalSize)
throws java.io.IOException
flip - Flip the loaded image by Y axistotalSize - Total size of the image in bytes including the mipmaps
java.io.IOException - If an error occured while reading from InputStream
public java.nio.ByteBuffer readRGB2D(boolean flip,
int totalSize)
throws java.io.IOException
flip - Flip the image on the Y axistotalSize - Size of the image in bytes including mipmaps
java.io.IOException - If an error occured while reading from InputStream
public java.nio.ByteBuffer readDXT2D(int totalSize)
throws java.io.IOException
totalSize - Total size of the image in bytes, including mipmaps
java.io.IOException - If an error occured while reading from InputStream
public java.util.ArrayList<java.nio.ByteBuffer> readData(boolean flip)
throws java.io.IOException
flip - Flip the image data or not.
For cubemaps, each of the cubemap faces is flipped individually.
If the image is DXT compressed, no flipping is done.
java.io.IOException - If an error occured while reading from the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||