Fixed useless resizing for blur, greyscale, invert, sepia

main
Killian 4 years ago
parent 3b5682800a
commit 47c121ec40

@ -1,6 +1,6 @@
{
"name": "discord-image-generation",
"version": "1.4.1",
"version": "1.4.2",
"description": "discord-image-generation is a powerfull module that allow you to generate awesome images.",
"main": "src/index.js",
"scripts": {

@ -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) => {

@ -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) => {

@ -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) => {

@ -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) => {

Loading…
Cancel
Save