Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/jimp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions packages/jimp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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");
Expand Down
5 changes: 2 additions & 3 deletions plugins/plugin-flip/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ export type FlipOptions = z.infer<typeof FlipOptionsSchema>;
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<I extends JimpClass>(image: I, options: FlipOptions) {
Expand Down