javascript - Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data -



javascript - Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data -

i getting error in chrome , opera browsers:

uncaught securityerror: failed execute 'getimagedata' on 'canvasrenderingcontext2d': canvas has been tainted cross-origin data.

the code working fine in net explorer, mozilla firefox, , safari. need prepare in chrome , opera. please help me find solution prepare problem?

i getting error @ line

imgdata = ctx.getimagedata(x1,y1,w,h);

may help, have mentioned cross origin seek this,

var uimageobj = new image();

crossorigin has set enable canvas info saved.the source image should have access-control-allow-origin set * or chosen domain

uimageobj.crossorigin = 'anonymous'; // crossorigin attribute has set before setting src.if reversed, wont work. uimageobj.src = obj_data.srcuser;

hope helps.

javascript html5 canvas

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -