next up previous
Next: 28.5.2 N'HOOD MIX Up: 28.5 File encoding Previous: 28.5 File encoding

28.5.1 SCREEN (image)

In VGA the screen is divided into 4 horizontal slices 160 pixels high. In SVGA (1024 768) the screen is divided into 8 horizontal slices 96 pixels high. Each slice is scanned left to right and each pixel column top to bottom. If the column has only background pixels the first byte is set to 0, otherwise background pixels are ignored. For non-background pixels, the first byte = the column count of the first pixel in a same-colour segment. If there is just one pixel in the segment, the high bit in this byte is set to 1, and the next byte holds the colour. If there is more than one, the next byte holds the number of pixels in the segment, the next byte the colour. The first two bytes in the file are reserved for the file size in bytes.