Skip to content

Commit

Permalink
use png
Browse files Browse the repository at this point in the history
  • Loading branch information
arjanfrans committed Apr 11, 2024
1 parent 795c888 commit 248a98f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
Binary file added src/assets/bull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions src/assets/bull.svg

This file was deleted.

6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "./main.css";
import BullSvg from "./assets/bull.svg";
import BullPng from "./assets/bull.png";
import Font_NeueAaachen from "./assets/NeueAachenBlack.woff2";
import Font_AccidentalPresidency from "./assets/AccidentalPresidency.woff2";
import { GamesRepository } from "./games-repository.ts";
Expand Down Expand Up @@ -174,7 +174,7 @@ async function renderCanvas(canvas: HTMLCanvasElement, options: DrawOptions) {
ctx.lineWidth = 4;
ctx.strokeRect(50, 50, 700, 350);

await drawImage(ctx, BullSvg, -240, -45, 700, 700);
await drawImage(ctx, BullPng, -140, 60, 500, 500);

ctx.fillStyle = "#ffffff";
ctx.font = "96px Neue Aachen";
Expand Down Expand Up @@ -344,7 +344,7 @@ function uploadBackground(
const downloadLink = document.createElement("a");

downloadLink.style.display = "none";
downloadLink.href = canvas.toDataURL();
downloadLink.href = canvas.toDataURL("image/png");
downloadLink.download = "ballpark-hard.png";

document.body.appendChild(downloadLink);
Expand Down

0 comments on commit 248a98f

Please sign in to comment.