Hi - I'd just store all the images (as you'd get from the image generator site) into one big file one after the other and store the offsets somewhere.
Then:
var images = require("Storage").read("myimages");
// note 'images' is not actually using up your RAM, it's still stored in flash
g.drawImage(images.substr(offset,len));
The substr will do a copy of the small image into RAM, but honestly if it's a small icon that's not going to cause a big problem.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi - I'd just store all the images (as you'd get from the image generator site) into one big file one after the other and store the offsets somewhere.
Then:
The
substr
will do a copy of the small image into RAM, but honestly if it's a small icon that's not going to cause a big problem.