Skip to content

Commit

Permalink
Added 'bombs are not a joke' image edit option
Browse files Browse the repository at this point in the history
  • Loading branch information
wiki-Bird committed Sep 24, 2024
1 parent 7c21134 commit e395adf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Binary file added images/bomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/commands/imgedit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const imgedit: Command = {
{ name: "Invert", value: "invert" },
{ name: "1984", value: "1984" },
{ name: "Puter", value: "puter"},
{ name: "Bomb", value: "bomb"},
{ name: "blank", value: "blank"}
)
)
Expand Down Expand Up @@ -133,7 +134,6 @@ const imgedit: Command = {
ctx.drawImage(img, 300, 0, 550, 650);
const puter = await loadImage("https://raw.githubusercontent.com/wiki-Bird/meowd/main/images/puter.png");
ctx.drawImage(puter, 0, 0, 1024, 1024);

}
else if (action === "invert") {
const imgData = ctx.getImageData(0, 0, 1024, 1024);
Expand All @@ -153,6 +153,11 @@ const imgedit: Command = {
const nineEightFour = await loadImage("https://raw.githubusercontent.com/wiki-Bird/meowd/main/images/1984.png");
ctx.drawImage(nineEightFour, 0, 0, 1024, 1024);
}
else if (action === "bomb") {
ctx.drawImage(img, 0, 0, 1024, 1024);
const bomb = await loadImage("https://raw.githubusercontent.com/wiki-Bird/meowd/main/images/bomb.png");
ctx.drawImage(bomb, 0, 0, 1024, 1024);
}
else if (action === "blank") {
// do nothing, just return the image
}
Expand Down

0 comments on commit e395adf

Please sign in to comment.