I have an image loaded into <img src="https://www.someotherdomain.com/myimg.jpg">
in the document and I am wanting to use JS to determine how "bright" on average the image is (to adjust the colour of overlay elements to improve visibility.
The answer here: Image Dark/Light Detection Client Sided Script works just fine...except for the fact that it doesn't work on cross origin resources. The images I will be needing to determine brightness for could be from any domain and I don't have control over setting the necessary CORS headers on the server to be passed back along with the response to make it easy for JS to use the image.
Is there some way to get the brightness of an image from an external domain without having to worry about CORS?