Created
August 28, 2013 03:43
-
-
Save fkei/6361924 to your computer and use it in GitHub Desktop.
blog.fkei.me : Canvas.toDataURL() -> img.src -> CORS(´・ω・`)ショボーン
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var b64 = canvas.toDataURL() | |
var $img = new Image(); | |
$img.crossOrigin = 'Anonymous'; | |
$img.src = b64; | |
// もとに戻すとき null を入れるといいよ。 | |
$img.crossOrigin = null; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment