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
+27
View File
@@ -0,0 +1,27 @@
import { Jimp, getTestDir } from "@jimp/test-utils";
import configure from "@jimp/custom";
import expect from "@storybook/expect";
import gif from "../src";
const jimp = configure({ types: [gif] }, Jimp);
describe("GIF", () => {
const imagesDir = getTestDir(__dirname) + "/images";
it("load GIF", async () => {
const image = await jimp.read(imagesDir + "/flower.gif");
expect(image.getPixelColor(10, 10)).toBe(0xe5e6d9ff);
});
it("load animated GIF", async () => {
const image = await jimp.read(imagesDir + "/animated.gif");
expect(image.getPixelColor(10, 10)).toBe(0xa1d2f1ff);
});
it("export GIF", async () => {
const jgd = await jimp.read(imagesDir + "/flower.gif");
const buffer = await jgd.getBufferAsync("image/gif");
expect(buffer.toString()).toMatch(/^GIF/);
});
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB