🖥️프론트엔드/HTML | CSS | JAVASCRIPT
자바스크립트 - canvas base64 데이터 추출
Janger
2021. 12. 8. 10:33
728x90
var image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); // here is the most important part because if you dont replace you will get a DOM 18 exception.
출처:
https://stackoverflow.com/questions/10673122/how-to-save-canvas-as-an-image-with-canvas-todataurl
How To Save Canvas As An Image With canvas.toDataURL()?
I'm currently building a HTML5 web app/Phonegap native app and I can't seem to figure out how to save my canvas as an image with canvas.toDataURL(). Can somebody help me out? Here's the code, what's
stackoverflow.com
728x90