Files always begin with a 50-byte header.
Offset | Type | Details |
---|---|---|
0 | char[8] | Magic ident "ANISHARE" |
8 | uint8 | Version number (currently 0) |
9 | uint16 | Frame width (usually 720?) |
11 | uint16 | Frame height (usually 720?) |
13 | uint8 | Layer count (usually 3?) |
14 | uint16 | Frame count (max 240) |
16 | uint8 | Frame rate (frames per second, max 24) |
17 | uint8 | Flags |
18 | uint8[32] | Padding (null bytes) |
Flag | Description |
---|---|
1 << 0 | Playback is looped |
1 << 1 | Remixing is enabled |
After the header, frames are stored in playback order, one after another. Each frame comprises a header followed by layer data. The frame header is always 20 bytes long.
Offset | Type | Details |
---|---|---|
0 | uint16 | Frame ID |
2 | uint8[3] | Paper color |
5 | uint8[3] | Pen color 1 |
8 | uint8[3] | Pen color 2 |
11 | uint8[3] | Pen color 3 |
14 | uint8[6] | Padding (null bytes) |
Colors are in the sRGB color space.
Index | Details |
---|---|
0 | Red |
1 | Green |
2 | Blue |
All layers are stored in a single bitmap. The bitmap width is frame width * layer count
, the bitmap height is frame height
. The bitmap is 2 bits per pixel, going from left to right, top to bottom.
In this bitmap, layers are stored side-to-side horizontally, with the first layer being the leftmost slice.
A pixel will be 0
if it is transparent (paper color), 1
for the first pen color, 2
for the second pen color, and so on.