Skip to content

zhuker/apng4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Read

Gray[] gr = APNG.read(new File("my.apng"));

Write

byte x = (byte) 255;
byte[] a0 = {
        0, x, 0,
        x, 0, x,
        0, x, 0 };
byte[] a1 = {
        0, x, 0,
        0, x, 0,
        0, x, 0 };
byte[] a2 = {
        x, 0, x,
        x, 0, x,
        x, 0, x };

Gray[] g = new Gray[] {
        new Gray(3, 3, a0, APNG.DELAY_1S),
        new Gray(3, 3, a1, APNG.DELAY_1S),
        new Gray(3, 3, a2, APNG.DELAY_1S)};
        
File f = new File("my.apng");
f.createNewFile();
APNG.write(g, f, APNG.INFINITE_LOOP);

resulting images

resulting animated image

Releases

No releases published

Packages

No packages published

Languages