jimp

import { img } from "./img";
import { createJimp } from "@jimp/core";
import { defaultFormats, defaultPlugins } from "jimp";
import webp from "@jimp/wasm-webp";

// A custom jimp that supports webp
const Jimp = createJimp({
formats: [...defaultFormats, webp],
plugins: defaultPlugins,
});

const jpg = await (await Jimp.read(
img,
)).resize({ h: 120, w: 120 }).getBuffer("image/webp");
import { img } from "./img";
import { createJimp } from "@jimp/core";
import { defaultFormats, defaultPlugins } from "jimp";
import webp from "@jimp/wasm-webp";

// A custom jimp that supports webp
const Jimp = createJimp({
formats: [...defaultFormats, webp],
plugins: defaultPlugins,
});

const jpg = await (await Jimp.read(
img,
)).resize({ h: 120, w: 120 }).getBuffer("image/webp");
is it possible to use jimp wasm?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?