chore: add jimp dependency, icon padding script, and update configuration

This commit is contained in:
2026-05-31 14:04:37 +02:00
parent 30f81045ac
commit 7cd17307ba
1126 changed files with 166400 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

+30
View File
@@ -0,0 +1,30 @@
import { Jimp, getTestDir } from "@jimp/test-utils";
import configure from "@jimp/custom";
import jpeg from "@jimp/jpeg";
import color from "@jimp/plugin-color";
import resize from "@jimp/plugin-resize";
import expect from "@storybook/expect";
import threshold from "../src";
const jimp = configure(
{ types: [jpeg], plugins: [threshold, color, resize] },
Jimp
);
describe("Threshold", function () {
this.timeout(15000);
it("defines default threshold for lighter backgrounds", async () => {
const expectedImage = await jimp.read(
getTestDir(__dirname) + "/images/hands_mx200_rp255.jpg"
);
const testImage = await jimp.read(
getTestDir(__dirname) + "/images/hands.jpg"
);
expect(testImage.threshold({ max: 200, replace: 255 }).hash()).toBe(
expectedImage.hash()
);
});
});