From d017b4cf813025e415767195a4e3f163c6156a0d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 31 Mar 2024 01:17:36 -0400 Subject: [PATCH] Update gm to ImageMagick v7+ --- README.md | 25 ++++++++++++------------- commands/edit-image/charcoal.js | 2 +- commands/edit-image/emboss.js | 2 +- commands/edit-image/implode.js | 2 +- commands/edit-image/liquid-rescale.js | 2 +- commands/edit-image/noise.js | 2 +- commands/edit-image/oil-painting.js | 2 +- commands/edit-image/sketch.js | 2 +- commands/edit-image/squish.js | 2 +- commands/edit-image/swirl.js | 2 +- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index a1f5133d..f5c23c81 100644 --- a/README.md +++ b/README.md @@ -16,19 +16,18 @@ Just read `LICENSE.md`. Give credit if you use any part of this monster, thanks. 8. [Follow these instructions to install the dependencies for `node-canvas`](https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems). 9. Run `apt install liblqr-1-0-dev liblqr-1-0` to install liblqr (needed for ImageMagick). 10. [Follow these instructions to install ImageMagick](https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/). -11. Run `apt install gm` to install GraphicsMagick. -12. [Follow these instructions to set up Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04). Remember to set up a password! -13. Run `apt install libtool` so sodium can compile if necessary. **(Optional)** -14. Download [the NSFW model](https://github.com/gantman/nsfw_model) and extract the contents to `/tf_models/nsfw`. -15. Run `apt install wine` to install wine. -16. Run `dpkg --add-architecture i386` to allow installation of wine32. -17. Run `apt update` again. -18. Run `apt install wine32` to install wine32. -19. Run `apt install xvfb` to install xvfb. -20. Run `yarn install --production` in the folder you cloned the bot. -21. Run `npx parse-domain-update` to update the domain list for `parse-domain`. -22. Run `npm i -g pm2` to install PM2. -23. Run `pm2 start Xiao.js --name xiao` to run the bot. +11. [Follow these instructions to set up Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04). Remember to set up a password! +12. Run `apt install libtool` so sodium can compile if necessary. **(Optional)** +13. Download [the NSFW model](https://github.com/gantman/nsfw_model) and extract the contents to `/tf_models/nsfw`. +14. Run `apt install wine` to install wine. +15. Run `dpkg --add-architecture i386` to allow installation of wine32. +16. Run `apt update` again. +17. Run `apt install wine32` to install wine32. +18. Run `apt install xvfb` to install xvfb. +19. Run `yarn install --production` in the folder you cloned the bot. +20. Run `npx parse-domain-update` to update the domain list for `parse-domain`. +21. Run `npm i -g pm2` to install PM2. +22. Run `pm2 start Xiao.js --name xiao` to run the bot. ## Commands Total: 509 diff --git a/commands/edit-image/charcoal.js b/commands/edit-image/charcoal.js index 145025fd..dcc0e76b 100644 --- a/commands/edit-image/charcoal.js +++ b/commands/edit-image/charcoal.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); diff --git a/commands/edit-image/emboss.js b/commands/edit-image/emboss.js index 25ec4bd7..a3e3c199 100644 --- a/commands/edit-image/emboss.js +++ b/commands/edit-image/emboss.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); diff --git a/commands/edit-image/implode.js b/commands/edit-image/implode.js index b2e49195..8e1bbf26 100644 --- a/commands/edit-image/implode.js +++ b/commands/edit-image/implode.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); diff --git a/commands/edit-image/liquid-rescale.js b/commands/edit-image/liquid-rescale.js index ef4f9d98..c488c937 100644 --- a/commands/edit-image/liquid-rescale.js +++ b/commands/edit-image/liquid-rescale.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); diff --git a/commands/edit-image/noise.js b/commands/edit-image/noise.js index 9ab1bf38..b15c5b58 100644 --- a/commands/edit-image/noise.js +++ b/commands/edit-image/noise.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); const types = ['uniform', 'gaussian', 'multiplicative', 'impulse', 'laplacian', 'poisson']; diff --git a/commands/edit-image/oil-painting.js b/commands/edit-image/oil-painting.js index 1a4a1dd4..fc53b643 100644 --- a/commands/edit-image/oil-painting.js +++ b/commands/edit-image/oil-painting.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); diff --git a/commands/edit-image/sketch.js b/commands/edit-image/sketch.js index aa78bea2..db4d8062 100644 --- a/commands/edit-image/sketch.js +++ b/commands/edit-image/sketch.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer, reactIfAble } = require('../../util/Util'); const { LOADING_EMOJI_ID, SUCCESS_EMOJI_ID } = process.env; diff --git a/commands/edit-image/squish.js b/commands/edit-image/squish.js index 803999c0..48f28665 100644 --- a/commands/edit-image/squish.js +++ b/commands/edit-image/squish.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util'); diff --git a/commands/edit-image/swirl.js b/commands/edit-image/swirl.js index 1b539cda..b741d8fe 100644 --- a/commands/edit-image/swirl.js +++ b/commands/edit-image/swirl.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const gm = require('gm').subClass({ imageMagick: true }); +const gm = require('gm').subClass({ imageMagick: '7+' }); const request = require('node-superfetch'); const { magikToBuffer } = require('../../util/Util');