Is there a way to convert e.g.
var FLOORIMG = require("heatshrink").decompress(atob("iEKxH+kklABuLAAlgAAwNFB34OLmAAO0YAO5wAOA"));
to 3bpp without having the original png file?
Also if I change
b = Graphics.createArrayBuffer(178,178,8);
to
b = Graphics.createArrayBuffer(178,178,3);
I get
Uncaught Error: Invalid BPP
It looks fine in B/W though:
b = Graphics.createArrayBuffer(178,178,2,{msb:true}); var gimg = { width:178, height:178, bpp:2, buffer:b.buffer };
Edit: I now understood that setting
var H = b.getHeight()-24; b.setColor("#ff0000"); b.fillRect(0,0,b.getWidth(),H-1);
instead of
var H = b.getHeight()-24; b.setColor("#71c6cf"); b.fillRect(0,0,b.getWidth(),H-1);
will stop dirthering, but how can I show some shade of grey? Is that not possible?
PS: I intended to let it run in full resolution - but that will be too slow. So I stopped developing that. I's be curious about the Grey thought :)
@Hank started
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.
Is there a way to convert e.g.
to 3bpp without having the original png file?
Also if I change
to
I get
It looks fine in B/W though:
Edit:
I now understood that setting
instead of
will stop dirthering, but how can I show some shade of grey? Is that not possible?
PS: I intended to let it run in full resolution - but that will be too slow. So I stopped developing that. I's be curious about the Grey thought :)