Chunk

A PNG file consists of the magic number then a stream of chunks. This struct represents those chunks.

struct Chunk {
uint size;
ubyte[4] type;
ubyte[] payload;
uint checksum;
}

Members

Functions

stype
const(char)[] stype()

returns the type as a string for easier comparison with literals

toArray
ubyte[] toArray()

Puts it into the format for outputting to a file

Meta