diff --git a/packages/jimp/README.md b/packages/jimp/README.md index 81942f85..3ba5587d 100644 --- a/packages/jimp/README.md +++ b/packages/jimp/README.md @@ -35,7 +35,7 @@ const { Jimp } = require("jimp"); // open a file called "lenna.png" const image = await Jimp.read("test.png"); -image.resize(256, 256); // resize +image.resize({ w: 256, h: 256 }); // resize await image.write("test-small.jpg"); // save ``` diff --git a/packages/jimp/src/index.ts b/packages/jimp/src/index.ts index 9c5f6a8e..19b2e565 100644 --- a/packages/jimp/src/index.ts +++ b/packages/jimp/src/index.ts @@ -101,7 +101,7 @@ export const JimpMime = { * * const image = await Jimp.read("test/image.png"); * - * image.resize(256, 100); + * image.resize({ w: 256, h: 100 }); * image.greyscale(); * * await image.write('test/output.png'); @@ -116,7 +116,7 @@ export const JimpMime = { * * const image = await Jimp.read("https://upload.wikimedia.org/wikipedia/commons/0/01/Bot-Test.jpg"); * - * image.resize(256, 100); + * image.resize({ w: 256, h: 100 }); * image.greyscale(); * * const output = await image.getBuffer("test/image.png"); diff --git a/plugins/plugin-flip/src/index.ts b/plugins/plugin-flip/src/index.ts index 3fff7038..321ae513 100644 --- a/plugins/plugin-flip/src/index.ts +++ b/plugins/plugin-flip/src/index.ts @@ -13,15 +13,14 @@ export type FlipOptions = z.infer; export const methods = { /** * Flip the image. - * @param horizontal a Boolean, if true the image will be flipped horizontally - * @param vertical a Boolean, if true the image will be flipped vertically + * @param options an object with horizontal and vertical booleans * @example * ```ts * import { Jimp } from "jimp"; * * const image = await Jimp.read("test/image.png"); * - * image.flip(true, false); + * image.flip({ horizontal: true, vertical: false }); * ``` */ flip(image: I, options: FlipOptions) {