Commit e401e6d8 authored by Vincent Wei's avatar Vincent Wei
Browse files

fetch PNG via HTTP

parent 5b59a5f7
......@@ -30,7 +30,7 @@ WebDisplay.prototype.onmessage = function (msg) {
var bytes = new Uint8Array (msg.data, 16, msg.data.byteLength - 16);
var image = new Image();
image.src = 'data:image/png;base64,' + btoa (String.fromCharCode.apply (null, bytes));
image.src = String.fromCharCode.apply (null, bytes);
image.onload = function () {
this.context.drawImage (image, dirtyRect[0], dirtyRect[1], dirtyRect[2] - dirtyRect[0], dirtyRect[3] - dirtyRect[1]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment