jimp-dev / jimp-dev/jimp

Cannot create new Jimp from Buffer

Open
#932 0 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

# Expected Behavior

Would like to create a new Jimp object from a buffer

# Current Behavior

with this code:
```
new Jimp({
data: Buffer.from(
``
),
width: width,
height: height
});
```
I get the error message:
```
Error: w and h must be numbers
```

## Steps to Reproduce

run this code :
```
new Jimp({
data: Buffer.from(
``
),
width: width,
height: height
});
```

## Context

Basically what I'm trying to do is generate a Jimp object with rounded corners to use as a mask on another image (i.e. with `myImage.composite(maskFromBuffer,0,0)`

- Jimp Version: 0.9.8
- Operating System: MacOS
- Node version:v12.17.0

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.