Package arc.graphics
Class PixmapIO
java.lang.Object
arc.graphics.PixmapIO
Writes Pixmaps to various formats.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass based on https://github.com/Mike-C/lwjPNG, with many modificationsstatic classPNG encoder with compression. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PixmapreadPNG(byte[] bytes) Reads a PNG file using a pure-Java PNG decoder.static PixmapReads a PNG file using a pure-Java PNG decoder.static voidWrites the pixmap as a PNG with compression.static byte[]writePngBytes(Pixmap pixmap) Writes the pixmap as a PNG with compression.
-
Constructor Details
-
PixmapIO
public PixmapIO()
-
-
Method Details
-
writePng
Writes the pixmap as a PNG with compression. SeePixmapIO.PngWriterto configure the compression level, more efficiently flip the pixmap vertically, and to write out multiple PNGs with minimal allocation. -
writePngBytes
Writes the pixmap as a PNG with compression. SeePixmapIO.PngWriterto configure the compression level, more efficiently flip the pixmap vertically, and to write out multiple PNGs with minimal allocation.- Throws:
IOException
-
readPNG
Reads a PNG file using a pure-Java PNG decoder. -
readPNG
Reads a PNG file using a pure-Java PNG decoder.
-