jimp-dev/jimp

Maximum and minimum file size supported

Aberta

#1.081 aberto em 6 de abr. de 2022

 (1 comentário) (1 reação) (0 responsável)JavaScript (785 forks)batch import
documentationfile size issuehelp wanted

Métricas do repositório

Stars
 (13.218 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador