The XD environment doesn’t support all of the features of a browser.
There is a feature request for adding a BitmapData
object here.
I can’t seem to find it now but there is somewhere some examples of loading a remote image, saving it locally and then reading it as a byte array.