From d9f680517fc557f3be66d7197b07ea0cc19ab668 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 18 Nov 2026 08:39:50 -0700 Subject: Pictures in a post's grid are painted from sharp tile copies. "the thumbs came out grainy i don't think they scaled down very well" (Adam, 2026-11-18). Gallery tiles used the 1100px column copy, and the browser shrank it about eight times into a 140px row, which came out grainy. They now use the Images feed's tile copy: 360px tall, cut with a high-quality resize, made in the same worker pass as the column copy, and read back from disk with it. A picture without a tile copy yet asks for one. feed-picture-pager-test (gallery tiles painted from tile copies), feed-media-views, feed-media-cache and features-smoke pass. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6TV6sjEZSpqqBen9T5 --- tools/feed-picture-pager-test.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/feed-picture-pager-test.js b/tools/feed-picture-pager-test.js index 7578e01..947c6aa 100644 --- a/tools/feed-picture-pager-test.js +++ b/tools/feed-picture-pager-test.js @@ -93,6 +93,11 @@ try { }); check('two pictures in a post: one gallery, side by side, one height', gal.n === 2 && gal.sameRow && gal.h > 50 && gal.h < 300, JSON.stringify(gal)); check('a lone picture is not put in a gallery', gal.lone); + // painted from the tile copy (a proper resize), not the column copy shrunk by the browser + check('gallery tiles are painted from the tile copies', await waitFor(() => { + const g = document.querySelector('.notes-feed .note-gallery'); + return !!g && [...g.querySelectorAll('img')].every((i) => /^blob:/.test(i.currentSrc || i.src) && i.naturalHeight > 0 && i.naturalHeight <= 360); + }, null, 5000)); console.log('\n[a tap on the picture that opened it shows its details; the next closes it]'); const y0 = await openPic('two pictures'); -- cgit v1.2.3