jimp-dev / jimp-dev/jimp

Clarify documentation: callback not required to create an image

Open
#957 1 comment 1 reaction 0 assignees View on GitHub
documentation help wanted solution in issue
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

The documentation says:

> Iyou want to begin with an empty Jimp image, you can call the Jimp constructor passing the width and height of the image to create and a Node-style callback:

```
new Jimp(256, 256, (err, image) => {
// this image is 256 x 256, every pixel is set to 0x00000000
});
```

However, it works fine to not pass the callback:

```js
const image = new Jimp(256, 256);
```

Not sure if both options are valid, but it would have made my code simpler from the start if I realised I didn't need the callback.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.