18×18 icon format

From Sinclair Wiki
Jump to navigation Jump to search


Proposed format for the 18×18 icons used in the Buddy GUI by Andrew Owen.

Each icon is stored in 56 bytes. This is not very RAM efficient but speeds up drawing by removing the need to shift the data.

The first 54 bytes contain the bitmap in the following format:

Each of the 18 lines is stored in 3 bytes

The 2nd and 3rd byte store the middle 16 pixels of the icon

The 1st byte has the following meaning:

bit 0: first pixel of the line

bit 1-6: always 0

bit 7: last pixel of the line

The last two bytes contain the attributes for the middle 4 cells with the following meaning:

[F E D C] [B A 9 8] [7 6 5 4] [3 2 1 0]

cell 3 cell 2 cell 1 cell 0

For each nibble the following meaning applies:

d0-2: paper colour (000 = transparent)

d3: BRIGHT (0 = off)

The background of the outermost pixels is always transparent. When an icon is selected the attributes of the cells are inverted and the outermost pixels are changed to white from black.

NOTE: The icon format described above was been superseded by IZX, an improved open source and royalty-free standard format and reference implementation for ZX-Spectrum icons, by Andrew Owen & Einar Saukas. Additional details can be found here.