semmixcolor and perception

Plain text ($01)

GIF89a provided a way to store text that the decoder draws onto the image itself, instead of keeping it as pixels. The idea never caught on: almost no browser or graphics program supports it.

Structure

BytesField
0-121 01: extension, plain text label
2fixed block length: always 0C (12)
3-4text grid left position
5-6top position
7-8grid width in pixels
9-10grid height in pixels
11character cell width in pixels
12character cell height
13text color index (global palette)
14background color index
thenASCII text sub-blocks, 00 terminator

The text fills the grid of cells left to right and top to bottom. For example an 80 × 16 pixel grid with 8 × 16 cells holds one row of 10 characters.

Example

21 01 0C 00 00 00 00 left 0, top 0 50 00 10 00 grid 80 × 16 08 10 cell 8 × 16 02 01 text in color 2 (black) on background 1 (white) 06 73 65 6D 6D 69 78 sub-block: "semmix" 00 terminator

Why it does not work

The extension is worth knowing only to skip it correctly (see extension blocks). The specification treats it as a rendering block, so a graphic control block may precede it, just as for an image.