People getting out of memory errors with samples from the complete folder can open samples\complete\js\helpers.js and replace this function...
function _img(value) {
if (_isFile(value)) {
return gdi.Image(value);
} else {
return gdi.Image(folders.images + value);
}
}
with
function _img(value) {
let img;
if (_isFile(value)) {
img = gdi.Image(value);
} else {
img = gdi.Image(folders.images + value);
}
if (!img) return null;
const MAX_SIZE = 1000;
if (img.Width < MAX_SIZE && img.Height < MAX_SIZE) return img;
const s = Math.min(MAX_SIZE / img.Width, MAX_SIZE / img.Height);
const w = Math.floor(img.Width * s);
const h = Math.floor(img.Height * s);
return img.Resize(w, h);
}
Using the old function, I tested it with 8 large 5000px + images that take 40MB on disk but caused SMP to use nearly 900MB of ram according to window.PanelMemoryUsage
After this change, the reported value was 22MB.
edit: resizing doesn't come for free - there might be an apparent freeze for a second or 2 while it hogs the CPU!! YMMV.