Layers, ink and visibility

How two drawing layers become a composed Flipnote frame.

Each Flipnote frame presents paper plus two independent ink layers. A pixel in one layer does not automatically erase the corresponding pixel in the other. Composition order and the chosen colours determine the visible result, while a hidden layer still has stored drawing data. A renderer must keep storage state and visibility state separate. [1][2]

Per-frame colour state

PPM frame headers carry palette choices and visibility information. The colour seen on screen is not a permanent RGB value attached to each drawn pixel: the layer bitmap records whether a pixel is inked, and the frame's palette maps that ink to a visible colour. Changing the palette can recolour existing marks without rewriting every bitmap pixel. [1][2]

What “hidden” means

The presentation path can suppress one layer while leaving its encoded rows intact. This matters to thumbnail generation, playback and editing. A thumbnail that composites both stored layers regardless of the visibility bits can reveal artwork that the creator hid; a converter that deletes hidden bytes cannot restore them later. [1][2]

Implementation checks

  • Decode layer 1 and layer 2 independently. For difference frames, apply any X/Y translation while reconstructing from the previous frame, before colour composition.
  • Read hide-layer bits from the animation header at 0x06A0; the compact per-frame header supplies the frame's paper and ink choices, not those hide bits.
  • Apply the frame-local palette and animation-level visibility when composing the decoded pixels.
  • Test overlapping pixels, each layer hidden in turn, identical ink colours and an empty frame, while preserving the stored layer data. [1][2]

Sources

  1. [1] Flipnote Decompilation Project — Frame decoding, rendering, palette and display
  2. [2] Flipnote Studio Docs — PPM format

← All documentation