|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.glutils.ETC1
public class ETC1
Class for encoding and decoding ETC1 compressed images. Also provides methods to add a PKM header.
Nested Class Summary | |
---|---|
static class |
ETC1.ETC1Data
Class for storing ETC1 compressed image data. |
Field Summary | |
---|---|
static int |
ETC1_RGB8_OES
|
static int |
PKM_HEADER_SIZE
The PKM header size in bytes |
Constructor Summary | |
---|---|
ETC1()
|
Method Summary | |
---|---|
static Pixmap |
decodeImage(ETC1.ETC1Data etc1Data,
Pixmap.Format format)
Takes ETC1 compressed image data and converts it to a Pixmap.Format.RGB565 or Pixmap.Format.RGB888 Pixmap . |
static ETC1.ETC1Data |
encodeImage(Pixmap pixmap)
Encodes the image via the ETC1 compression scheme. |
static ETC1.ETC1Data |
encodeImagePKM(Pixmap pixmap)
Encodes the image via the ETC1 compression scheme. |
static void |
formatHeader(java.nio.ByteBuffer header,
int offset,
int width,
int height)
Writes a PKM header to the ByteBuffer . |
static int |
getCompressedDataSize(int width,
int height)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int PKM_HEADER_SIZE
public static int ETC1_RGB8_OES
Constructor Detail |
---|
public ETC1()
Method Detail |
---|
public static ETC1.ETC1Data encodeImage(Pixmap pixmap)
Pixmap.Format.RGB565
and Pixmap.Format.RGB888
are supported.
pixmap
- the Pixmap
ETC1.ETC1Data
public static ETC1.ETC1Data encodeImagePKM(Pixmap pixmap)
Pixmap.Format.RGB565
and Pixmap.Format.RGB888
are supported. Adds
a PKM header in front of the compressed image data.
pixmap
- the Pixmap
ETC1.ETC1Data
public static Pixmap decodeImage(ETC1.ETC1Data etc1Data, Pixmap.Format format)
Pixmap.Format.RGB565
or Pixmap.Format.RGB888
Pixmap
. Does
not modify the ByteBuffer's position or limit.
etc1Data
- the ETC1.ETC1Data
instanceformat
- either Pixmap.Format.RGB565
or Pixmap.Format.RGB888
public static int getCompressedDataSize(int width, int height)
width
- the width in pixelsheight
- the height in pixels
public static void formatHeader(java.nio.ByteBuffer header, int offset, int width, int height)
ByteBuffer
. Does not modify the position or limit of the ByteBuffer.
header
- the direct native order ByteBuffer
offset
- the offset to the header in byteswidth
- the width in pixelsheight
- the height in pixels
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |