webpost.ing

Where a drawing lives in webpaint.ing: device, memory and graphics card

By releases ·

webpaint.ing is the drawing app that sits beside this site. A drawing is a lot of pixels, and a computer has three places to keep them, each faster and smaller than the one before. This note says what is kept where today, what moves between the places and when, and what each move costs. Anything not built yet is marked as planned.

The three places

A cel is one layer on one frame of an animation. Everything below is counted per cel.

Tiles

A layer's picture is cut into squares of 256 by 256 pixels (smaller along the right and bottom edges). A tile with nothing on it, fully transparent, is not kept at all, so a line drawing on a big sheet is a handful of small tiles. Memory holds each kept tile compressed with Zstandard. The device holds each as a PNG. Nothing on the card is compressed: a picture there is plain pixels, so it can be drawn into at full speed. Packed tiles are never changed in place, which is why a copied frame can start by sharing the very same tiles as the frame it was copied from.

What a picture costs on the card

The engine counts a layer's picture as the width times the height times eight bytes: four for the pixels and four for a second buffer the drawing surface carries. That is 32 MB at 2048 by 2048, 128 MB at 4096 by 4096 and 512 MB at 8192 by 8192. Every limit below is in those terms.

Moves between the places

Planned, not built

Links