You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the browser, image.crossOrigin = "Anonymous" needs to be set before the image is loaded. Otherwise, drawing the image to a canvas makes it impossible to get the pixels out of that canvas (context.drawImage works, but later getImageData won't).
You can't set it for all images, b/c non-CORS-served images will crash on load. I guess we could catch that and retry without crossOrigin. Or retry with our own CORS proxy.
This isn't an issue on Node.
The text was updated successfully, but these errors were encountered:
In the browser,
image.crossOrigin = "Anonymous"
needs to be set before the image is loaded. Otherwise, drawing the image to a canvas makes it impossible to get the pixels out of that canvas (context.drawImage
works, but latergetImageData
won't).You can't set it for all images, b/c non-CORS-served images will crash on load. I guess we could catch that and retry without
crossOrigin
. Or retry with our own CORS proxy.This isn't an issue on Node.
The text was updated successfully, but these errors were encountered: