Updated eslint, Jimp, and other dependencies

This commit is contained in:
n1474335 2024-06-11 18:07:22 +01:00
parent 7eb887ca51
commit 2b275f0897
No known key found for this signature in database
GPG key ID: D15457B7B4AF3F37
35 changed files with 2939 additions and 1926 deletions

View file

@ -10,7 +10,7 @@ import { isImage } from "../lib/FileType.mjs";
import { toBase64 } from "../lib/Base64.mjs";
import { gaussianBlur } from "../lib/ImageManipulation.mjs";
import { isWorkerEnvironment } from "../Utils.mjs";
import jimp from "jimp";
import Jimp from "jimp/es/index.js";
/**
* Sharpen Image operation
@ -68,7 +68,7 @@ class SharpenImage extends Operation {
let image;
try {
image = await jimp.read(input);
image = await Jimp.read(input);
} catch (err) {
throw new OperationError(`Error loading image. (${err})`);
}
@ -137,9 +137,9 @@ class SharpenImage extends Operation {
let imageBuffer;
if (image.getMIME() === "image/gif") {
imageBuffer = await image.getBufferAsync(jimp.MIME_PNG);
imageBuffer = await image.getBufferAsync(Jimp.MIME_PNG);
} else {
imageBuffer = await image.getBufferAsync(jimp.AUTO);
imageBuffer = await image.getBufferAsync(Jimp.AUTO);
}
return imageBuffer.buffer;
} catch (err) {