mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-27 11:56:50 -06:00
Zoomed in on an image, the canvas smoothed it with bicubic sampling, so a screenshot under inspection went soft at every edge and its pixels could not be told apart. Checking a screenshot of a live page against its design up close needs the pixels as they are. The canvas now samples an image paint at the nearest pixel once each image pixel covers two or more device pixels. Below that the image stays smooth: between 1x and 2x nearest sampling draws pixels one and two device pixels wide side by side, which looks jagged rather than sharp. Exports, thumbnails, PDF and SVG are unchanged: the switch is a render option, magnified_image_pixels, that only the canvas sets, and the retained renderer reuses a render only when it matches. Pixel preview was not a fit: it rasterises the whole canvas at 1x or 2x, so vectors and text go blocky along with the image.