| Modifier and Type | Class and Description |
|---|---|
| public static class | ETC1.
Class for storing ETC1 compressed image data. |
| Modifier and Type | Field and Description |
|---|---|
| public static int | |
| public static int | PKM_HEADER_SIZE
The PKM header size in bytes |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Pixmap | Returns: the Pixmapthe etc1Data,ETC1Data instanceeither formatFormat#RGB565 or Format#RGB888Takes ETC1 compressed image data and converts it to a |
| private static native void | decodeImage(ByteBuffer
the compressed image data in a direct native order compressedData, int ByteBufferthe offset in bytes to the image data from the start of the buffer offset, ByteBuffer the decoded data in a direct native order ByteBuffer, must hold width * height * pixelSize bytes. decodedData, int the offset in bytes to the decoded image data. offsetDec, int the width in pixels width, int the height in pixels height, int the pixel size, either 2 (RBG565) or 3 (RGB888) pixelSize)Decodes the compressed image data to RGB565 or RGB888 pixel data. |
| public static ETC1. | Returns: theETC1Datathe pixmap)PixmapEncodes the image via the ETC1 compression scheme. |
| private static native ByteBuffer | Returns: a new direct native order ByteBuffer containing the compressed image datathe image data in a direct native order imageData, int ByteBufferthe offset in bytes to the image data from the start of the buffer offset, int the width in pixels width, int the height in pixels height, int the pixel size, either 2 (RGB565) or 3 (RGB888) pixelSize)Encodes the image data given as RGB565 or RGB888. |
| public static ETC1. | Returns: theETC1Datathe pixmap)PixmapEncodes the image via the ETC1 compression scheme. |
| private static native ByteBuffer | Returns: a new direct native order ByteBuffer containing the compressed image datathe image data in a direct native order imageData, int ByteBufferthe offset in bytes to the image data from the start of the buffer offset, int the width in pixels width, int the height in pixels height, int the pixel size, either 2 (RGB565) or 3 (RGB888) pixelSize)Encodes the image data given as RGB565 or RGB888. |
| public static native void | formatHeader(ByteBuffer
the direct native order header, int ByteBufferthe offset to the header in bytes offset, int the width in pixels width, int the height in pixels height)Writes a PKM header to the |
| public static native int | getCompressedDataSize(int
the width in pixels width, int the height in pixels height)Returns: the number of bytes needed to store the compressed data |
| pack-priv static native int | getHeightPKM(ByteBuffer
direct native order header, int ByteBuffer holding the PKM headerthe offset in bytes to the PKM header from the ByteBuffer's start offset)Returns: the height stored in the PKM header |
| private static int | |
| pack-priv static native int | getWidthPKM(ByteBuffer
direct native order header, int ByteBuffer holding the PKM headerthe offset in bytes to the PKM header from the ByteBuffer's start offset)Returns: the width stored in the PKM header |
| pack-priv static native boolean | isValidPKM(ByteBuffer
direct native order header, int ByteBuffer holding the PKM headerthe offset in bytes to the PKM header from the ByteBuffer's start offset)Returns: the width stored in the PKM header |
| ETC1_RGB8_OES | back to summary |
|---|---|
| public static int ETC1_RGB8_OES | |
| PKM_HEADER_SIZE | back to summary |
|---|---|
| public static int PKM_HEADER_SIZE The PKM header size in bytes | |
| ETC1 | back to summary |
|---|---|
| public ETC1() | |
| decodeImage | back to summary |
|---|---|
| public static Pixmap decodeImage(ETC1. Takes ETC1 compressed image data and converts it to a
| |
| decodeImage | back to summary |
|---|---|
| private static native void decodeImage(ByteBuffer compressedData, int offset, ByteBuffer decodedData, int offsetDec, int width, int height, int pixelSize) Decodes the compressed image data to RGB565 or RGB888 pixel data. Does not modify the position or limit of the
| |
| encodeImage | back to summary |
|---|---|
| public static ETC1. Encodes the image via the ETC1 compression scheme. Only | |
| encodeImage | back to summary |
|---|---|
| private static native ByteBuffer encodeImage(ByteBuffer imageData, int offset, int width, int height, int pixelSize) Encodes the image data given as RGB565 or RGB888. Does not modify the position or limit of the
| |
| encodeImagePKM | back to summary |
|---|---|
| public static ETC1. Encodes the image via the ETC1 compression scheme. Only | |
| encodeImagePKM | back to summary |
|---|---|
| private static native ByteBuffer encodeImagePKM(ByteBuffer imageData, int offset, int width, int height, int pixelSize) Encodes the image data given as RGB565 or RGB888. Does not modify the position or limit of the
| |
| formatHeader | back to summary |
|---|---|
| public static native void formatHeader(ByteBuffer header, int offset, int width, int height) Writes a PKM header to the
| |
| getCompressedDataSize | back to summary |
|---|---|
public static native int getCompressedDataSize(int width, int height)
| |
| getHeightPKM | back to summary |
|---|---|
pack-priv static native int getHeightPKM(ByteBuffer header, int offset)
| |
| getPixelSize | back to summary |
|---|---|
| private static int getPixelSize(Pixmap. | |
| getWidthPKM | back to summary |
|---|---|
pack-priv static native int getWidthPKM(ByteBuffer header, int offset)
| |
| isValidPKM | back to summary |
|---|---|
pack-priv static native boolean isValidPKM(ByteBuffer header, int offset)
| |
| Modifier and Type | Field and Description |
|---|---|
| public final ByteBuffer | compressedData
the optional PKM header and compressed image data |
| public final int | dataOffset
the offset in bytes to the actual compressed data. |
| public final int | height
the height in pixels |
| public final int | width
the width in pixels |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | dispose()
Implements com. Releases the native resources of the ETC1Data instance. |
| public boolean | |
| public String | |
| public void |
| compressedData | back to summary |
|---|---|
| public final ByteBuffer compressedData the optional PKM header and compressed image data | |
| dataOffset | back to summary |
|---|---|
| public final int dataOffset the offset in bytes to the actual compressed data. Might be 16 if this contains a PKM header, 0 otherwise | |
| height | back to summary |
|---|---|
| public final int height the height in pixels | |
| width | back to summary |
|---|---|
| public final int width the width in pixels | |
| ETC1Data | back to summary |
|---|---|
| public ETC1Data(int width, int height, ByteBuffer compressedData, int dataOffset) | |
| ETC1Data | back to summary |
|---|---|
| public ETC1Data(FileHandle pkmFile) | |
| checkNPOT | back to summary |
|---|---|
| private void checkNPOT() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Releases the native resources of the ETC1Data instance. | |
| hasPKMHeader | back to summary |
|---|---|
public boolean hasPKMHeader()
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| write | back to summary |
|---|---|
| public void write(FileHandle file) Writes the ETC1Data with a PKM header to the given file.
| |