Image grids shift tiles and can change low-valued uint8 pixels
Reproduced on dev (5c7285e) in the client media payload tests.
images() places tiles at padding + 1 even though grid dimensions reserve only padding. With padding=0 the first row and column are displaced; other padding values produce asymmetric borders. The grid is also allocated as float64, so uint8 image data containing only 0 and 1 is subsequently treated as normalized floating-point data and 1 becomes 255.
Expected: symmetric requested padding, original uint8 pixel intensities, and the intended white grid background. Reproduction uses decoded PNG payloads for padding 0, 1, and 2, plus uint8 values 0, 1, and 200. Five regression cases fail on current dev.
I have prepared a fix preserving the input dtype, using dtype-appropriate white padding, and using the requested offset. Investigated with AI assistance.
Source: fossasia/visdom