Package arc.graphics

Class PixmapIO

java.lang.Object
arc.graphics.PixmapIO

public class PixmapIO extends Object
Writes Pixmaps to various formats.
  • Constructor Details

    • PixmapIO

      public PixmapIO()
  • Method Details

    • writePng

      public static void writePng(Fi file, Pixmap pixmap)
      Writes the pixmap as a PNG with compression. See PixmapIO.PngWriter to configure the compression level, more efficiently flip the pixmap vertically, and to write out multiple PNGs with minimal allocation.
    • writePngBytes

      public static byte[] writePngBytes(Pixmap pixmap) throws IOException
      Writes the pixmap as a PNG with compression. See PixmapIO.PngWriter to configure the compression level, more efficiently flip the pixmap vertically, and to write out multiple PNGs with minimal allocation.
      Throws:
      IOException
    • readPNG

      public static Pixmap readPNG(Fi file)
      Reads a PNG file using a pure-Java PNG decoder.
    • readPNG

      public static Pixmap readPNG(byte[] bytes)
      Reads a PNG file using a pure-Java PNG decoder.