0

I would like to get the RGB pixel data of an image that I drag-and-drop to the browser, i.e. an image from my harddrive that is in the Chrome Active Tab.

I am not sure what permission I should ask for it in the manifest file, since the address of the image is "file:///C:/Users..."

If the image is on the web, then I can ask for cross-origin permission such as "https://*/*", and everything works, but for my local image I get an error: "The canvas has been tainted by cross-origin data."

To get the pixel data I followed the direction of:

How to get a pixel's x,y coordinate color from an image?

Thanks

Ilan
  • 23
  • 4
  • possible duplicate of https://stackoverflow.com/questions/27774998/the-canvas-has-been-tainted-by-cross-origin-data – ReyAnthonyRenacia Jan 22 '18 at 02:08
  • It seems to be a duplicate of https://stackoverflow.com/questions/19894948/canvas-has-been-tainted-by-cross-origin-data-via-local-chrome-extension-url Or at least the answer provided may work for my problem as well, but I still have to try it. – Ilan Jan 24 '18 at 02:36
  • Update: I was unable to utilize the solution in the above link. I get the same error message as before. The issue of overcoming the security error when trying to access RGB pixel data on an image which is stored on a local harddrive is for me still an open issue. – Ilan Feb 18 '18 at 21:30

0 Answers0