mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
The renderer decoded each image within its 2 GB allowance (512 MB in the web build) and then converted it to RGBA. The decoder holds the decoded image, before conversion, to that allowance, so an image stored with fewer than four bytes a pixel (gray, 1-bit, gray with alpha, or RGB without alpha) could take up to four times as much (4/3 times for RGB) once converted, and as much again as the pixmap drawn from it. The renderer now reads the image's size from its header first. When width × height × 4 is over the allowance it does not decode the image and handles it as one it can't decode: the renderer draws nothing for it, and a raster export warns that an image is missing. Images within the allowance are decoded and drawn as before.