|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.PixmapIO
public class PixmapIO
Class with static methods to read and write Pixmaps to a custom zlib based format. First three integers define the width, height and format, remaining bytes are zlib compressed pixels.
Constructor Summary | |
---|---|
PixmapIO()
|
Method Summary | |
---|---|
static Pixmap |
readCIM(FileHandle file)
Reads the Pixmap from the given file, assuming the Pixmap was written with the
writeCIM(FileHandle, Pixmap) method. |
static void |
writeCIM(FileHandle file,
Pixmap pixmap)
Writes the Pixmap to the given file using a custom compression scheme. |
static void |
writePNG(FileHandle file,
Pixmap pixmap)
Writes the pixmap as a PNG. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PixmapIO()
Method Detail |
---|
public static void writeCIM(FileHandle file, Pixmap pixmap)
Pixmap
to the given file using a custom compression scheme. To be able to load the Pixmap to a Texture,
use ".cim" as the file suffix! Throws a GdxRuntimeException in case the Pixmap couldn't be written to the file.
file
- the file to write the Pixmap topublic static Pixmap readCIM(FileHandle file)
Pixmap
from the given file, assuming the Pixmap was written with the
writeCIM(FileHandle, Pixmap)
method. Throws a GdxRuntimeException in case the file couldn't be read.
file
- the file to read the Pixmap frompublic static void writePNG(FileHandle file, Pixmap pixmap)
writeCIM(FileHandle, Pixmap)
is
faster if the file does not need to be read outside of libgdx.
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |