sketchpad
sketchpad copied to clipboard
Unable to save (Screenshot)
When I click on the screenshot button from tool menu it shows.
sketchpad.js:4096 Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state. at Sketchpad.renderOutputCanvas (http://127.0.0.1:5500/demos/libs/sketchpad.js:4096:23) at Sketchpad.screenshot (http://127.0.0.1:5500/demos/libs/sketchpad.js:4103:33) at HTMLDivElement.
(http://127.0.0.1:5500/demos/js/advanced.js:181:17)
Here is the code of screenshot
//screenshot
document
.getElementById('tool-screenshot')
.addEventListener('click', function () {
sketchpad.screenshot(
function (blob) {
saveFile(blob, sketchpad.room.room_token + '.png', 'image/png');
},
'image/png',
1
);
});