When I'm using the file in local c drive i got an error
(Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.) the url didnt generate thorows an error
$(document).ready(function(){
init();
$("#reset").bind("mousedown",resetClick)
});
function init(){
stage = new createjs.Stage("myCanvas"); //get the canvas in the stage
my_map=new createjs.Bitmap('octopus_line.png'); //create the bitmap
my_map.y=0;
my_map.x=0;
stage.addChildAt(my_map,2);
}
function resetClick(){
img = new Image();
img.crossOrigin="Anonymous";
//generate the url using toDataURL
canvas=document.getElementsByTagName("canvas")[0];
url=canvas.toDataURL("image/png").replace("image/png","image/octet-stream");
img.src = url;
download(img.src,"filename.png")
}