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
'๐ฅ๏ธํ๋ก ํธ์๋ > HTML | CSS | JAVASCRIPT' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
html - ๊ฐ๋ฐ์ ๋๊ตฌ ๋ง๊ธฐ(์ฌ์ฉํ๊ธฐ ํ๋ค๊ฒ) (0) | 2022.02.24 |
---|---|
์๋ฐ์คํฌ๋ฆฝํธ - localStorage์ ํด๋์ค ๋ณ์ ์ ์ฅํ๊ธฐ (0) | 2022.02.10 |
์๋ฐ์คํฌ๋ฆฝํธ - html ์คํฌ๋ฆฐ์ทํ๊ธฐ html2canvas (0) | 2021.12.08 |
CSS - ๋ฏธ๋์ด ์ฟผ๋ฆฌ (0) | 2021.11.29 |
์๋ฐ์คํฌ๋ฆฝํธ - XMLHttpRequest ์ฟ ํค ๊ฐ๋ ํจ๊ป ๋ณด๋ด๊ธฐ (0) | 2021.11.17 |