For security reasons, Canvas
does not allow you to retrieve the Pixels
of remote images (i.e., from a URL not on your own server). Neither can you export a canvas rendering such images (no Canvas.image()
or Canvas.save()
). During testing, you may opt to include (small) images in your script as data URLs. This script can be used to generate the data URL of an image, provided that your browser supports FileReader
(it ).