-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add conversion to 256 palette for PNG #282
Comments
PNG quantization functions require libvips to be compiled with libimagequant, which is (unfortunately) licensed under GPLv3. There's a possibility to use a version prior to v1.5.0, for e.g. by using this fork, since that version had a BSD-2 license. However, since image quantization is generally a time-consuming operation, it will require some research on our part to check if it can be added to the public API. |
Another approach to get PNG palette is vips.exe pngsave in.png out.png --palette --strip |
The As for this particular image, you could try to turn off filtering. $ vips.exe copy note_ss_main1.png x.png[palette,compression=9,strip,filter=0,dither=0]
$ Get-Childitem -file x.png | select length
Length
------
47072 See https://stackoverflow.com/a/66194787 for some background info. |
I see how to do it locally, but the issue is about processing it online via Weserv. :) |
This would be amazing. Quantization (when done correctly) can save an incredible amount of bandwidth. |
Bumpity bump bump I'm making another website and wanted to check on this... using the proxy to handle profile image URLs from a service that for some reason doesn't send cache-control headers or do quantization. |
I would definitely use this mode for 99% of web graphics.
The text was updated successfully, but these errors were encountered: