+ 1

The operation is insecure

https://code.sololearn.com/W0rWha2JjdgJ/?ref=app When I use both “drawImage” and “getImageData”,the error message “the operation is insecure” comes on “getImageData” line and I have no idea how I can solve this. I beg you for help. m(_ _)m (sorry for my poor English)

21st Aug 2019, 2:41 AM
jealous
jealous - avatar
2 Respostas
+ 3
It's a security feature of browsers. You are running this code from sololearn.com and so you may only getImageData from images located at sololearn.com, not gyazo.com. I'm not sure there is much you can do. Here's how I got around this in the past: https://code.sololearn.com/WFJ9b4yExk1V/?ref=app I converted the entire image into a data URL and dumped it in the src attribute. But yeah, it's not optimal. But at least it works.
21st Aug 2019, 4:36 AM
Schindlabua
Schindlabua - avatar
+ 1
I understand. Thank you very mich!!
21st Aug 2019, 6:58 AM
jealous
jealous - avatar