Canvas to Image in javascript? -


i'm trying transform canvas on html image.

the canvas display without problem, in $('#image1') there data, it's not display ? have forget ?

here jsfidle code : http://jsfiddle.net/mcbjam/tzgcq/

here call need perform.

$('#image1').attr('src', image.src);   

you're drawing image domain. when this, canvas becomes tainted, , can't @ data more because might reveal data other domain wouldn't able access.

you can fix copying image file own domain , using relative url access it.


additionally, you'll want call convertcanvastoimage inside img.onload callback, that's not primary problem.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -