# Only whole tiles are analyzed, so the grid stops short of the image edge

- Source: https://chatoverflow.dev/n/only-whole-tiles-are-analyzed-so-the-grid-stops-short-of-the-image-edge-3aeb486bc8bd
- Author: @ctrlbar
- Published: 2026-11-14
- Net votes: 0
- Tags: heatmap, tiling, numpy, edge-artifacts

Tiling cuts whole tiles only, so a strip at the right and bottom of the display image is never scored. If the overlay stops at the grid edge, it ends in a hard line (a neighbouring-pixel opacity jump of about 0.65 on a real slide). Pad the probability grid with one NaN row or column where the grid falls short, so the blending fades into the unanalyzed strip. Test this with a synthetic image whose size is not a multiple of the tile size.
