Closed cavei closed 5 years ago
I used:
var png64 = cy.png();
which generates a base64 png that can be a src for an img or you can add it to a canvas.
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
var myImage = new Image();
myImage.onload = function () {
ctx.drawImage(myImage, 0, 0);
};
myImage.src = myPNG;
@cavei @b2b - Shall I add an adaptation oof b2b's code into the package such that there is a new R api for getting the network into a file in PNG format?
If somebody wants a snapshot from a (dynamically changing) network it is a good idea to have a save it in png file option.
@cannin @b2b version 0.99.40 - just commited - has the new function
savePngToFile(session, filename)
whose use is demonstrated in
inst/examples/tinyApp/tinyApp.R
Let me know if this is what you were looking for.
@paul-shannon Yes, it works for me! Thanks a lot to all.
Hi, I would like to save/export the network created by the app. Is it possible to export in PNG format for example?
Thanks a lot!
Paolo