javascript - toDataUrl - saving Images in IE? -


i have spent lot of time building dress-up game using kineticjs , seem have fallen @ final hurdle.

i have created 'snapshot' button wanted allow users print canvas window or tab. here snippet of code:

camera.prototype.takesnapshot = function() {      var backgroundlayer = this.controller.view.getbackgroundlayer();     var backgroundcontext = backgroundlayer.getcontext();      var manikinlayer = this.controller.view.getmanikinlayer();     var manikincanvas = manikinlayer.getcanvas();      //combine background , 'manikin' layers     backgroundcontext.drawimage(manikincanvas,0 ,0);      //open data url in new window     var manikinimageurl = backgroundlayer.getcanvas().todataurl('image/png');     window.open(manikinimageurl); }; 

now im sure have guessed already, works in ff, chrome, safari win, not ie or ios safari. having done research believe versions if ie flat out dont support functionality?

i looking expert confirm if true or not.

also please tell me how fuse the backgroundlayer , manikinlayer before printed out? getting errpr 'value not converted of: htmlimageelement, htmlcanvaselement, htmlvideoelement' on 5th line of code.

any appreciated close junking project after having put in effort!

in new window, create image element source set dataurl:

    var win=window.open();     win.document.write("<img src='"+manikinimageurl+"'/>"); 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -