Skip to content

Commit

Permalink
Use Image constructor instead of creating img element.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Jan 17, 2021
1 parent 0e98478 commit 8ac5bf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Server/wwwroot/src/RemoteControl/DtoMessageHandler.ts
Expand Up @@ -66,12 +66,12 @@ export class DtoMessageHandler {
}

if (captureFrame.EndOfFrame) {
let completedFrame = new Blob(this.ImagePartials);
let completedFrame = new Blob(this.ImagePartials, { type: "image/jpeg" });

this.ImagePartials = [];

var url = window.URL.createObjectURL(completedFrame);
var img = document.createElement("img");
let url = window.URL.createObjectURL(completedFrame);
let img = new Image(captureFrame.Width, captureFrame.Height);
img.onload = () => {
UI.Screen2DContext.drawImage(img,
captureFrame.Left,
Expand Down

0 comments on commit 8ac5bf0

Please sign in to comment.