diff --git a/README.md b/README.md index 686cd39..ed86d33 100644 --- a/README.md +++ b/README.md @@ -186,11 +186,11 @@ bot.login("super_secret_token") - ``new DIG.Rip().getImage(``);`` -![RIP](https://imgur.com/MgsRH8o.png) +![RIP](https://imgur.com/qhyZKfz.png) - ``new DIG.Spank().getImage(``, ``);`` -![Spank](https://imgur.com/VRvogo7.png) +![Spank](https://imgur.com/25gq0es.png) - ``new DIG.Stonk().getImage(``);`` @@ -229,6 +229,10 @@ bot.login("super_secret_token") # Changelog +## v1.3.8 +- Edited the Rip() image +- Fixed the Spank() colors + ## v1.3.4 - Added bobross() diff --git a/package.json b/package.json index 2fc3cc9..69e30e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord-image-generation", - "version": "1.3.7", + "version": "1.3.8", "description": "discord-image-generation is a powerfull module that allow you to generate awesome images.", "main": "src/index.js", "scripts": { diff --git a/src/assets/rip.png b/src/assets/rip.png index f5060e0..a53f587 100644 Binary files a/src/assets/rip.png and b/src/assets/rip.png differ diff --git a/src/module/montage/rip.js b/src/module/montage/rip.js index e903946..e0fe099 100644 --- a/src/module/montage/rip.js +++ b/src/module/montage/rip.js @@ -1,5 +1,4 @@ const Canvas = require("canvas"); -const jimp = require("jimp"); module.exports = class Rip { /** @@ -9,12 +8,12 @@ module.exports = class Rip { async getImage(image) { if (!image) throw new Error(`You must provide an image.`); - const canvas = Canvas.createCanvas(244, 253); + const canvas = Canvas.createCanvas(720, 405); const ctx = canvas.getContext(`2d`); const background = await Canvas.loadImage(`${__dirname}/../../assets/rip.png`); - ctx.drawImage(background, 0, 0, canvas.width, canvas.height); const avatar = await Canvas.loadImage(image); - ctx.drawImage(avatar, 63, 110, 90, 90); + ctx.drawImage(avatar, 110, 47, 85, 85); + ctx.drawImage(background, 0, 0, canvas.width, canvas.height); return canvas.toBuffer(); } } \ No newline at end of file diff --git a/src/module/montage/spank.js b/src/module/montage/spank.js index f410113..5e71891 100644 --- a/src/module/montage/spank.js +++ b/src/module/montage/spank.js @@ -14,6 +14,8 @@ module.exports = class Spank { image2 = await jimp.read(image2); image1.circle(); image2.circle(); + image1.greyscale(); + image2.greyscale(); bg.resize(500, 500); image1.resize(140, 140); image2.resize(120, 120);