Image.fromBytes() doesn't work as expected in HTML5

To see this, go to the ‘SimpleImage’ lime sample and edit line 39 to look like:

image = Image.fromBytes(Assets.getBytes("assets/lime.png"));

Then do ‘lime test html5’ in the prompt to see what I mean. It works fine under Neko (Windows 10) and Android.

Try using Image.loadFromBytes, it’s necessary to wait for loading an image from bytes in the browser

Unfortunately, I have tried

Image.loadFromBytes(.....).result()

and

Image.loadFromBytes(.....).value

both without success.

Try

Image.loadFromBytes (bytes).onComplete (function (image) {
    trace ("loaded image");
}).onError (function (e) {
    trace (e);
});

We cannot block on HTML5, either

Ah, I see. Thank you very much.