Hi (me again), I got it to work and its really cool, this opens a few very cool possibilities.
I am using the npm library canvas to draw offscreen images and animations, now to put them on the pitft i need to write a .png file before i can pass them over to the pitft, this is fairly slow and somewhat ugly and unnecessary (see following code) ... would it be possible to pass a stream directly to fb.image(...) ?
var Buffer = {
update: function (canvas) {
var out = fs.createWriteStream(image_path);
var stream = canvas.pngStream();
stream.pipe(out);
out.on('finish', function () {
fb.image(0, 0, image_path);
});
}
};
Hi (me again), I got it to work and its really cool, this opens a few very cool possibilities.
I am using the npm library canvas to draw offscreen images and animations, now to put them on the pitft i need to write a .png file before i can pass them over to the pitft, this is fairly slow and somewhat ugly and unnecessary (see following code) ... would it be possible to pass a stream directly to fb.image(...) ?
var Buffer = {
update: function (canvas) {
var out = fs.createWriteStream(image_path);
var stream = canvas.pngStream();
stream.pipe(out);
out.on('finish', function () {
fb.image(0, 0, image_path);
});
}
};