An Image (single frame widget) is formatted as:
- a 6-byte header as 3-words:
- word1 – Width: horizontal size of the image
- word2 – Height: vertical size of the image
- word3:
- byte5 – colour_mode: 16dec = 65K colour mode / 16-bit colours / 2 bytes per pixel
- byte6 – zero
- raw pixel data as drawn from left to right and going down:
- Pixel11 to Pixel1W
- Pixel21 to Pixel2W
- …
- PixelH1 to PixelHW
A Video (multi-frame widget) is formatted as:
- a 8-byte header as 4-words:
- word1 – Width: horizontal size of the image
- word2 – Height: vertical size of the image
- word3:
- byte5 – colour_mode: 16dec = 65K colour mode / 16-bit colours / 2 bytes per pixel
- byte6 – frame delay (non-zero)
- word4: Frames: number of frames
- raw pixel data as drawn from left to right, going down from first to last frame:
- Pixel111 to Pixel11W
- Pixel121 to Pixel12W
- …
- Pixel1H1 to Pixel1HW
- Pixel211 to Pixel21W
- Pixel221 to Pixel22W
- …
- Pixel2H1 to Pixel2HW
- …
- PixelF11 to PixelF1W
- PixelF21 to PixelF2W
- …
- PixelFH1 to PixelFHW