jimp-dev / jimp-dev/jimp

Docs for resize contradict each other

Open
#1,354 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

# Expected Behavior

I followed the instructions on https://jimp-dev.github.io/jimp/guides/getting-started/ and expect to get an image of width 100px

# Current Behavior

I get a huge crash

# Failure Information (for bugs)

## Steps to Reproduce

```
import { Jimp } from "jimp";

const name = "IMG_6637.JPG";

const image = await Jimp.read(`event/${name}`);
console.log({ width: image.width, height: image.height });
image.resize({ width: 100 });
await image.write("test/output.png");
```

but with
```
image.resize({ width: 100 });
```

which I found at https://jimp-dev.github.io/jimp/api/jimp/classes/jimp/#resize then it does work

**Screenshots**

## Context

- Jimp Version: 1.6
- Operating System: OSX Sequioa
- Node version: 18.18

## Failure Logs

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.