RGBV3D vector-v2 stores each pixel as a direction code, a norm proxy, and per-channel residuals. Without the residual layer, quantizing direction and magnitude would be lossy: two different RGB triplets could map to the same vector representation, and decode would invent colors that never existed in the source raster.
The research motivation is structural, not marketing. Smooth UI gradients and flat design panels often have low local entropy in direction space—neighboring pixels share similar hue vectors. A codebook can represent that compactly. But edges, anti-aliased text, and sensor noise break the assumption: the direction may still cluster, yet the exact 8-bit channel values differ in ways no coarse codebook captures.
Residuals close the gap mathematically. After reconstructing the quantized vector contribution, the encoder writes signed deltas for R, G, and B (exact bit width documented on the format page). Decode adds residuals back before writing RGB24. The invariant we test in CI and in the browser tool is blunt: decode(encode(pixels)) equals the input raster for profiles labeled lossless.
This differs from “visually lossless” HEIC or aggressive WebP. We explicitly reject hiding loss inside perceptual metrics for the core .rgbv3d profiles shipped today. When a future near-loss profile appears, it will use a different container label—not a silent default.
Practical workflow: upload a PNG on the RGBV3D tool page, pick vector-v2, download .rgbv3d, decode again, export PNG, and diff in your favorite editor. For batch checks use the CLI benchmark harness linked from /rgbv3d/download/. If residuals were omitted, banding on gradients would disappear but edge pixels would drift—our sample screenshots in /rgbv3d/benchmark/ include zoom crops where that drift would be obvious.
Why bother if PNG already exists? Because a documented, testable bitstream helps us experiment with block-adaptive modes and entropy stages without pretending PNG is the final word on RGB archives. The residuals are the honesty layer: they cost bytes on noisy frames (see the noise triage article) but preserve trust.
2026-06-18