Skip to content

The rings background is a 501x456 GIF that blurs on any hi-DPI screen - #910

Merged
xroche merged 1 commit into
masterfrom
vector-rings
Aug 2, 2026
Merged

The rings background is a 501x456 GIF that blurs on any hi-DPI screen#910
xroche merged 1 commit into
masterfrom
vector-rings

Conversation

@xroche

@xroche xroche commented Aug 2, 2026

Copy link
Copy Markdown
Owner

The panel decoration was drawn as vector and flattened to a 4KB indexed GIF around 2007, with the panel colour baked in as an opaque backdrop. It has only two colours, one of them byte-identical to the background-color the same element already paints. Refitting its four ellipse boundaries recovers the original geometry, so it goes back to being what it was: two elliptical annuli, 553 bytes of SVG, transparent so it composites over the panel instead of having to match it.

The geometry is fitted, not traced: sub-pixel boundary extraction (the alpha=0.5 crossing between neighbouring pixels, which also uses the sparse anti-aliased pixels) feeding a direct least-squares conic fit, max radial residual 0.57px. Rasterised at the same size, the only pixels that differ from the GIF are single-pixel anti-aliasing fringes along the four boundaries, and none survive a 3x3 erosion of that difference, so no edge has moved. An auto-trace would have produced several KB of bezier soup with the raster wobble baked in.

Test 142 asserted image/gif on the deleted file. That assertion moves to header_title_4.gif, and the new asset gets an image/svg+xml check; svg was already in htsserver's table.

The engine keeps its own embedded copy of this GIF for the backblue.gif it writes into mirrors. That one is untouched: the filename and byte length are a contract with pages already on disk.

The panel decoration was drawn as vector and flattened to a 4KB indexed GIF
some time around 2007, with the panel colour baked in as an opaque backdrop.
Refitting its four ellipse boundaries recovers the original geometry, so it
goes back to being what it was: two elliptical annuli, 553 bytes of SVG, with
a transparent background that now composites over the panel instead of having
to match it.

Rasterised at the same size, the only pixels that differ from the GIF are
single-pixel anti-aliasing fringes along the four boundaries. Nothing survives
a 3x3 erosion of that difference, so no edge has moved.

Dark mode still drops the image rather than inverting it, since the ring
lavender is a light-panel tone whichever way the file stores it.

The engine keeps its own embedded copy of this GIF for the backblue.gif it
writes into mirrors. That one is untouched: the filename and byte length are
a contract with pages already on disk.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) August 2, 2026 08:05
@xroche
xroche merged commit 620418a into master Aug 2, 2026
26 checks passed
@xroche
xroche deleted the vector-rings branch August 2, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant