Skip to content

Documentation is incorrect for getBuffer (example) #1342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sc0Vu opened this issue Sep 21, 2024 · 0 comments
Closed

Documentation is incorrect for getBuffer (example) #1342

sc0Vu opened this issue Sep 21, 2024 · 0 comments

Comments

@sc0Vu
Copy link

sc0Vu commented Sep 21, 2024

Expected Behavior

I believe the example of getBuffer would be:

import { Jimp } from "jimp";
import { promises as fs } from "fs";

const image = new Jimp({ width: 3, height: 3, color: 0xffffffff });

await image.getBuffer("image/jpeg", {
  quality: 50,
});

Current Behavior

The example is not correct (https://github.com/jimp-dev/jimp/blob/main/packages/core/src/index.ts).

Failure Information (for bugs)

N/A

Steps to Reproduce

image

Context

  • Jimp Version: 1.6.0
  • Operating System: N/A
  • Node version: N/A

Failure Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant