javascript - Google Chrome tainted canvas from local images -


i trying make vanilla javascript game html 5 canvas element, , in order make color-based hit boxes, need grab image data spots on canvas. whenever use getimagedata(), error:

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

all of images being displayed on canvas being pulled local file. there way working on chrome?

i draw images placing html image tags on page , using context.drawimage(*img id, x, y*);

it cors. can start chrome --allow-file-access-from-files development purposes , later load files same server site being hosted on, there no problem. note flag changes security settings of chrome.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -