Skip to content

Pixmap Table

The-Nice-One edited this page Jun 11, 2026 · 1 revision

pixmap_table table

Write the documentation content for pixmap_table table here.

Table Structure

Identifier

  • Value: [IDENTIFIER_PLACEHOLDER]

Configuration Flags

Bit Name Description
0 use_constant_width All pixmaps in this table share the same width.
1 use_constant_height All pixmaps in this table share the same height.
2 use_constant_bits_per_pixel All pixmaps in this table use the same number of bits to represent a pixel.
3-7 Reserved for future use.

Configuration Values

Name Type Condition Description
constant_width u8 If use_constant_width is enabled. The width in pixels shared by all pixmaps in this table.
constant_height u8 If use_constant_height is enabled. The height in pixels shared by all pixmaps in this table.
constant_bits_per_pixel u8 If use_constant_bits_per_pixel is enabled The bits per pixel shared by all pixmaps in this table (only 1-8 supported).

Table Links

Bit Name Description
0 link_color_tables
1-7 Reserved for future use.

Link Arrays

Name Type Condition Description
color_tables Vec<u8> # color_tables

Write the documentation content for color_tables here. |

Record Fields

Each record contains the following fields in order:

Field Type Condition Description
width [TYPE_PLACEHOLDER] # width

Write the documentation content for width here. | # width

Write the documentation content for width here. | | height | [TYPE_PLACEHOLDER] | # height

Write the documentation content for height here. | # height

Write the documentation content for height here. | | bits_per_pixel | [TYPE_PLACEHOLDER] | # bits_per_pixel

Write the documentation content for bits_per_pixel here. | # bits_per_pixel

Write the documentation content for bits_per_pixel here. | | data | [TYPE_PLACEHOLDER] | # data

Write the documentation content for data here. | # data

Write the documentation content for data here. |

Record Layout Examples

Example 1: Minimal pixmap (all constants set)

Configuration: constant_width=8, constant_height=8, constant_bits_per_pixel=1
Pixmap: 8×8 monochrome bitmap

Byte layout:  [data (8 bytes)]
Binary:       11111111 10000001 10000001 10000001 10000001 10000001 10000001 11111111
Hex:          FF       81       81       81       81       81       81       FF
Represents:   8×8 square outline (64 pixels, 1 bit each = 8 bytes)

Example 2: Custom dimensions

Configuration: constant_bits_per_pixel=1
Pixmap: 5×3 monochrome bitmap

Byte layout:  [width] [height] [data (2 bytes)]
Binary:       00000101 00000011 11111000 01110000
Hex:          05       03       F8       70
Calculation:  5×3 = 15 pixels × 1 bit = 15 bits = 2 bytes (1 unused bit)
Data:         11111 (row 1)
              000 01 (partial row 2)
              110 00 (partial row 3)
              00 (padding)

Example 3: Custom bits per pixel

Configuration: constant_width=4, constant_height=4
Pixmap: 4×4 bitmap with 4 colors (2 bits per pixel)

Byte layout:  [bits_per_pixel] [data (4 bytes)]
Binary:       00000010 00011011 00011011 00011011 00011011
Hex:          02       1B       1B       1B       1B
Calculation:  4×4 = 16 pixels × 2 bits = 32 bits = 4 bytes
Data:         00 01 10 11 | 00 01 10 11 | 00 01 10 11 | 00 01 10 11
              (Each group of 2 bits is a color index: 0, 1, 2, 3)

Example 4: Full custom record

Pixmap: 3×3 bitmap with 8-bit color (256 colors per pixel)

Byte layout:  [width] [height] [bits_per_pixel] [data (9 bytes)]
Binary:       00000011 00000011 00001000 
              11111111 00000000 00000000
              00000000 11111111 00000000
              00000000 00000000 11111111
Hex:          03       03       08       
              FF       00       00
              00       FF       00
              00       00       FF
Calculation:  3×3 = 9 pixels × 8 bits = 72 bits = 9 bytes
Data:         Red (255,0,0), Green (0,255,0), Blue (0,0,255), repeated 3 times

Example 5: Multi-bit packing detail

Pixmap: 6×1 with 2 bits per pixel (4 colors)

Configuration: constant_height=1, constant_bits_per_pixel=2
Byte layout:  [width] [data (2 bytes)]
Binary:       00000110 11100100 01000000
Hex:          06       E4       40
Calculation:  6 pixels × 2 bits = 12 bits = 2 bytes (4 unused bits)

Bit breakdown:
Byte 0:       11 10 01 00
              ││ ││ ││ ││
              ││ ││ ││ └└─ Pixel 3: color index 0
              ││ ││ └└──── Pixel 2: color index 1
              ││ └└─────── Pixel 1: color index 2
              └└────────── Pixel 0: color index 3

Byte 1:       01 00 00 00
              ││ ││ ││ ││
              ││ └└─└└─└└─ Unused padding bits
              └└────────── Pixel 5: color index 1
              (Pixel 4: 00 = color index 0, spans bytes)

Complete Table Example

The following byte sequence defines a minimal table with example records:

Byte(s) Binary Hex Description
1 [BINARY_PLACEHOLDER] [HEX_PLACEHOLDER] Table identifier
... ... ... [DESCRIPTION_PLACEHOLDER]

Clone this wiki locally