-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Create a PNG, the height cannot > 200000 #2539
Comments
Hi, this example works for me locally on Linux, albeit rather slowly. When dealing with such large PNG files you might want to lower the https://sharp.pixelplumbing.com/api-output#png My best guess would be that you're running out of memory. The example image is 2250 x 201000 x 3 bytes, around 1.4GB, when held uncompressed in RAM. |
@lovell My system is MacOS Big Sur 11.1 with 16GB RAM. I guess other limitation in unknown place. |
@lovell Thank you for your great job. Currently I make all images lower than a fixed number. I will upgrade it later. |
v0.28.1 is now available with improved PNG compression performance. Are you able to test to see if it has helped? |
@lovell no lucky, same error.
|
When you say "can't open it", what tool(s) are you using? Here's the output from the above code when I run it locally, which displays correctly in Chrome and Firefox: https://user-images.githubusercontent.com/210965/113830428-83edb800-977e-11eb-95fb-4a0614365c56.png |
Sorry, you are right, it can be opened by Chrome. It can't open with default preview tool on macOS Big Sur. |
Are you using the latest version? Is the version currently in use as reported by
npm ls sharp
the same as the latest version as reported bynpm view sharp dist-tags.latest
?0.26.3
What are the steps to reproduce?
No error report but image is corrupted/unused.
What is the expected behaviour?
Creat image success
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
Are you able to provide a sample image that helps explain the problem?
What is the output of running
npx envinfo --binaries --system
?The text was updated successfully, but these errors were encountered: