Skip to content

Commit

Permalink
FastPNG8 is simpler now.
Browse files Browse the repository at this point in the history
I'm not sure if it works how it should, yet.
  • Loading branch information
tommyettinger committed Sep 30, 2023
1 parent 372baf6 commit 71028e3
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 5,158 deletions.
16 changes: 8 additions & 8 deletions src/main/java/com/github/tommyettinger/anim8/AnimatedPNG.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@
* @author Tommy Ettinger
*/
public class AnimatedPNG implements AnimationWriter, Disposable {
static private final byte[] SIGNATURE = {(byte) 137, 80, 78, 71, 13, 10, 26, 10};
static private final int IHDR = 0x49484452, acTL = 0x6163544C,
private static final byte[] SIGNATURE = {(byte) 137, 80, 78, 71, 13, 10, 26, 10};
private static final int IHDR = 0x49484452, acTL = 0x6163544C,
fcTL = 0x6663544C, IDAT = 0x49444154,
fdAT = 0x66644154, IEND = 0x49454E44;
static private final byte COLOR_ARGB = 6;
static private final byte COMPRESSION_DEFLATE = 0;
static private final byte FILTER_NONE = 0;
static private final byte INTERLACE_NONE = 0;
// static private final byte FILTER_SUB = 1;
// static private final byte FILTER_PAETH = 4;
private static final byte COLOR_ARGB = 6;
private static final byte COMPRESSION_DEFLATE = 0;
private static final byte FILTER_NONE = 0;
private static final byte INTERLACE_NONE = 0;
// private static final byte FILTER_SUB = 1;
// private static final byte FILTER_PAETH = 4;

private final ChunkBuffer buffer;
private final Deflater deflater;
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/github/tommyettinger/anim8/FastPNG.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@
* @author Tommy Ettinger
*/
public class FastPNG implements Disposable {
static private final byte[] SIGNATURE = {(byte) 137, 80, 78, 71, 13, 10, 26, 10};
static private final int IHDR = 0x49484452;
static private final int IDAT = 0x49444154;
static private final int IEND = 0x49454E44;
static private final byte COLOR_ARGB = 6;
static private final byte COMPRESSION_DEFLATE = 0;
static private final byte FILTER_NONE = 0;
static private final byte INTERLACE_NONE = 0;
private static final byte[] SIGNATURE = {(byte) 137, 80, 78, 71, 13, 10, 26, 10};
private static final int IHDR = 0x49484452;
private static final int IDAT = 0x49444154;
private static final int IEND = 0x49454E44;
private static final byte COLOR_ARGB = 6;
private static final byte COMPRESSION_DEFLATE = 0;
private static final byte FILTER_NONE = 0;
private static final byte INTERLACE_NONE = 0;

private final ChunkBuffer buffer;
private final Deflater deflater;
Expand Down
Loading

0 comments on commit 71028e3

Please sign in to comment.