Repository navigation
v0.2.2 — fix drifting GIF background colour
Fixed
-
Panel background no longer drifts to random colours. NeuQuant's palette ordering is input-dependent, and whatever colour happened to land at palette index 0 became the GIF Logical Screen Descriptor's `background_color_index` — which the iDotMatrix firmware renders as the "off" colour between pixels. Over successive frame sets the background could drift to dim purple, orange, etc. instead of black.
Pin pure black at palette index 0 after NeuQuant finishes training, and mirror the swap when encoding frame pixels so no non-black pixels are forced onto the pinned slot. Verified via a captured debug GIF that `background_color_index` is 0 and `palette[0] = (0, 0, 0)`.