Closed jeakey closed 2 years ago
Libimagequant, by itself, doesn't support writing of any PNG files whatsoever. It only converts in-memory uncompressed pixels to in-memory uncompressed pixels in a different layout.
Any image format loading or saving (whether PNG, APNG, GIF, BMP, IFF-ILBM or smoke signals) is out of scope and entirely up to you.
So the problem is split in two parts:
With 1 I can help you. For 2, you need to find a library that can do it.
Thanks, I think I know how to do it.
If you need any more APNG things, we have code to write an APNG file with optimization in addition to a script to build and patch libpng with libpng-apng since it doesn't come standard. Hope this is useful for you!
https://github.com/CE-Programming/CEmu/tree/master/gui/qt/capture
Libimagequant can generate a single palette that is optimal for multiple images , but I don't kown how to compress APNG file , has any demo to compress APNG by Libimagequant? thanks~