-
-
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
PNG resize = large file sizes #1399
Comments
Hello, please see https://sharp.pixelplumbing.com/en/stable/api-output/#png
|
Thanks, and yup, read that area, but I wasn't aware what the various PNG input types are. So that's the cause then. Hopefully this clears it up for anyone else who isn't so versed on what indexed PNG input is as well! |
See also #478 for the canonical version of this question. |
Hello, libvips seems to support PNG8 format now. Can I use this option on sharp? |
Hi, Today i'm running the resize for my PNG file and i noticed the final result contain a file that has a bigger size than the original. Do you happen to know what would be the cause for this behaviour ? Btw, I had a look in the links provided here :) Thanks a lot! my code:
|
@victorkurauchi Please open a new issue, ensuring you've read https://sharp.pixelplumbing.com/api-output#png especially
|
Hi!
I'm migrating from Intervention image library to Sharp and have run into a snag. My PNG resizes are substantially larger via Sharp, compared to Intervention, which is using Imagemagick under the hood.
I've tried all the PNG settings available in Sharp, but still can't get anywhere close. Hopefully I'm just missing something?
Here are two PNG images, with alpha channel intact, resized from 2k or so down to 1024x1024.
Sharp is about 590KB, and Imagemagick is about 360KB!
Intervention code I'm using
Image->orientate()->fit(1024, 1024)->encode('png')
and Sharp is:
sharp().resize(1024, 1024).ignoreAspectRatio().png({ adaptiveFiltering: true })
adaptiveFiltering off seems to increase the file size even more on certain files, so I've left it on.
Any suggestions on how to get a comparative file size using Sharp??
The text was updated successfully, but these errors were encountered: