Fixed useless resizing for blur, greyscale, invert, sepia

This commit is contained in:
Killian
2020-12-10 22:11:49 +01:00
parent 3b5682800a
commit 47c121ec40
5 changed files with 1 additions and 5 deletions

View File

@@ -9,7 +9,6 @@ module.exports = class Blur {
async getImage(image, level) {
if (!image) throw new Error(`You must provide an image.`);
image = await jimp.read(image);
image.resize(480, 480);
image.blur(isNaN(level) ? 5 : parseInt(level));
let raw;
image.getBuffer(`image/png`, (err, buffer) => {

View File

@@ -8,7 +8,6 @@ module.exports = class Geryscale {
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
image = await jimp.read(image);
image.resize(480, 480);
image.greyscale();
let raw;
image.getBuffer(`image/png`, (err, buffer) => {

View File

@@ -8,7 +8,6 @@ module.exports = class Invert {
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
image = await jimp.read(image);
image.resize(480, 480);
image.invert();
let raw;
image.getBuffer(`image/png`, (err, buffer) => {

View File

@@ -8,7 +8,6 @@ module.exports = class Sepia {
async getImage(image) {
if (!image) throw new Error(`You must provide an image.`);
image = await jimp.read(image);
image.resize(480, 480);
image.sepia();
let raw;
image.getBuffer(`image/png`, (err, buffer) => {