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

@ -9,7 +9,7 @@ import OperationError from "../errors/OperationError.mjs";
import Utils from "../Utils.mjs";
import { isImage } from "../lib/FileType.mjs";
import { toBase64 } from "../lib/Base64.mjs";
import jimp from "jimp";
import Jimp from "jimp/es/index.js";
/**
* View Bit Plane operation
@ -52,7 +52,7 @@ class ViewBitPlane extends Operation {
if (!isImage(input)) throw new OperationError("Please enter a valid image file.");
const [colour, bit] = args,
parsedImage = await jimp.read(input),
parsedImage = await Jimp.read(input),
width = parsedImage.bitmap.width,
height = parsedImage.bitmap.height,
colourIndex = COLOUR_OPTIONS.indexOf(colour),
@ -78,7 +78,7 @@ class ViewBitPlane extends Operation {
});
const imageBuffer = await parsedImage.getBufferAsync(jimp.AUTO);
const imageBuffer = await parsedImage.getBufferAsync(Jimp.AUTO);
return new Uint8Array(imageBuffer).buffer;
}