| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | PixmapIO.
PNG encoder with compression. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Pixmap | readCIM(FileHandle
the file to read the Pixmap from file)Reads the |
| public static void | writeCIM(FileHandle
the file to write the Pixmap to file, Pixmap pixmap)Writes the |
| public static void | writePNG(FileHandle file, Pixmap pixmap, int
sets the deflate compression level. Default is compression, boolean Deflater#DEFAULT_COMPRESSIONflips the Pixmap vertically if true flipY)Writes the pixmap as a PNG. |
| public static void |
| PixmapIO | back to summary |
|---|---|
| public PixmapIO() | |
| readCIM | back to summary |
|---|---|
| public static Pixmap readCIM(FileHandle file) Reads the
| |
| writeCIM | back to summary |
|---|---|
| public static void writeCIM(FileHandle file, Pixmap pixmap) Writes the
| |
| writePNG | back to summary |
|---|---|
| public static void writePNG(FileHandle file, Pixmap pixmap, int compression, boolean flipY) Writes the pixmap as a PNG. See
| |
| writePNG | back to summary |
|---|---|
| public static void writePNG(FileHandle file, Pixmap pixmap) Writes the pixmap as a PNG with compression. See | |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final byte[] | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Pixmap | |
| public static void |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| readBuffer | back to summary |
|---|---|
| private static final byte[] readBuffer | |
| writeBuffer | back to summary |
|---|---|
| private static final byte[] writeBuffer | |
| CIM | back to summary |
|---|---|
| private CIM() | |
| read | back to summary |
|---|---|
| public static Pixmap read(FileHandle file) | |
| write | back to summary |
|---|---|
| public static void write(FileHandle file, Pixmap pixmap) | |
Copyright (c) 2007 Matthias Mann - www.matthiasmann.de Copyright (c) 2014 Nathan Sweet Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final PixmapIO. | |
| private static final byte | |
| private static final byte | |
| private ByteArray | |
| private final Deflater | |
| private static final byte | |
| private boolean | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final byte | |
| private int | |
| private ByteArray | |
| private static final byte | |
| private ByteArray | |
| private static final byte[] |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements com. Disposal will happen automatically in |
| public void | |
| public void | |
| public void | |
| public void | write(OutputStream output, Pixmap pixmap)
Writes the pixmap to the stream without closing the stream. |
| buffer | back to summary |
|---|---|
| private final PixmapIO. | |
| COLOR_ARGB | back to summary |
|---|---|
| private static final byte COLOR_ARGB | |
| COMPRESSION_DEFLATE | back to summary |
|---|---|
| private static final byte COMPRESSION_DEFLATE | |
| curLineBytes | back to summary |
|---|---|
| private ByteArray curLineBytes | |
| deflater | back to summary |
|---|---|
| private final Deflater deflater | |
| FILTER_NONE | back to summary |
|---|---|
| private static final byte FILTER_NONE | |
| flipY | back to summary |
|---|---|
| private boolean flipY | |
| IDAT | back to summary |
|---|---|
| private static final int IDAT | |
| IEND | back to summary |
|---|---|
| private static final int IEND | |
| IHDR | back to summary |
|---|---|
| private static final int IHDR | |
| INTERLACE_NONE | back to summary |
|---|---|
| private static final byte INTERLACE_NONE | |
| lastLineLen | back to summary |
|---|---|
| private int lastLineLen | |
| lineOutBytes | back to summary |
|---|---|
| private ByteArray lineOutBytes | |
| PAETH | back to summary |
|---|---|
| private static final byte PAETH | |
| prevLineBytes | back to summary |
|---|---|
| private ByteArray prevLineBytes | |
| SIGNATURE | back to summary |
|---|---|
| private static final byte[] SIGNATURE | |
| PNG | back to summary |
|---|---|
| public PNG() | |
| PNG | back to summary |
|---|---|
| public PNG(int initialBufferSize) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Disposal will happen automatically in
| |
| setCompression | back to summary |
|---|---|
| public void setCompression(int level) Sets the deflate compression level. Default is | |
| setFlipY | back to summary |
|---|---|
| public void setFlipY(boolean flipY) If true, the resulting PNG is flipped vertically. Default is true. | |
| write | back to summary |
|---|---|
| public void write(FileHandle file, Pixmap pixmap) throws IOException | |
| write | back to summary |
|---|---|
| public void write(OutputStream output, Pixmap pixmap) throws IOException Writes the pixmap to the stream without closing the stream. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ByteArrayOutputStream | |
| pack-priv final CRC32 |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| buffer | back to summary |
|---|---|
| pack-priv final ByteArrayOutputStream buffer | |
| crc | back to summary |
|---|---|
| pack-priv final CRC32 crc | |
| ChunkBuffer | back to summary |
|---|---|
| pack-priv ChunkBuffer(int initialSize) | |
| ChunkBuffer | back to summary |
|---|---|
| private ChunkBuffer(ByteArrayOutputStream buffer, CRC32 crc) | |
| endChunk | back to summary |
|---|---|
| public void endChunk(DataOutputStream target) throws IOException | |