Skip to content

Docs for resize contradict each other #1354

@simonh1000

Description

@simonh1000

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions