Skip to content
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

Maximum and minimum file size supported #1081

Open
kahilkubilay opened this issue Apr 6, 2022 · 1 comment
Open

Maximum and minimum file size supported #1081

kahilkubilay opened this issue Apr 6, 2022 · 1 comment
Labels
documentation Changes only affect the documentation file size issue help wanted

Comments

@kahilkubilay
Copy link

kahilkubilay commented Apr 6, 2022

With Jimp, I resize images on my local computer and on a live application. When I try to resize images with high dimensions (40k*40k or 100mb), I encounter a few errors. When calculating the total size, 2 different values are taken as a basis. These are the maxMemoryUsageInMB and maxResolutionInMP values. Exceeding any of these values returns an error code:::

maxMemoryUsageInMB::

maxMemory

maxResolutionInMP::

maxResolution

And sometimes when getting some of these errors I can see it coming due to the amount of RAM being exceeded. I guess this is happening because of NodeJS runtime.

nodeJSENV

I have a few questions.

  1. Up to what dimensions can I resize an image?
  2. What dimensions should the pixel pitches (10px10px -- 35000px35000px) of an image I want to resize be?

To test this situation, try to reconstruct a 1800x1800 pixel image with 36000*36000 dimensions. In such a scenario it will return error codes.


Jimp.read('./images/xxxxx.png', (err, image) => {
    if (err) throw err;
    image
      .resize(35000, 35000)
      .write('./images/dune-resize.png'); // save
});```

- Jimp Version: 0.16.1
- Node version: v17.4.0
@hipstersmoothie
Copy link
Collaborator

I'm not really sure! It would be awesome if you could find out and make a PR to update the docs with your findings. If it could be contained as a script that we could re-run as improvements are made that would be 🔥

@hipstersmoothie hipstersmoothie added help wanted documentation Changes only affect the documentation file size issue labels Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes only affect the documentation file size issue help wanted
Projects
None yet
Development

No branches or pull requests

2 participants