Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
kisahklasik authored Aug 4, 2024
1 parent 385ce53 commit 2498eed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ <h1>Example Twibbon</h1>

// combine image
function gen() {
let imgEle1 = document.getElementById("avatar");
let imgEle2 = document.getElementById("frame");
let baseIMG = document.getElementById("avatar");
let overlayIMG = document.getElementById("frame");
let canvas = document.getElementById("result");
let context = canvas.getContext("2d");

canvas.width = 1024;
canvas.height = 1024;
context.drawImage(imgEle1, 0, 0, canvas.width, canvas.height);
context.drawImage(imgEle2, 0, 0, canvas.width, canvas.height);
context.drawImage(baseIMG, 0, 0, canvas.width, canvas.height);
context.drawImage(overlayIMG, 0, 0, canvas.width, canvas.height);
}

// Download
Expand Down

0 comments on commit 2498eed

Please sign in to comment.