It's a simple set up:
#canvas { display: block; background-color: blue; }
<canvas id="canvas" width = "200" height = "200" ></canvas>
<script >
var canvas = document.getElementById('canvas');
setTimeout(() => {
var dataURL = canvas.toDataURL();
console.log(dataURL);
}, 3000);
</script>
I use a https://base64.guru/converter/decode/image to test URL, but even canvas.toBlog() also returns black
I just update Laravel and computer sw this month. Hoping someone has some ideas..
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community