Use libimagequant for palette generation
I've developed a library for high-quality quantization that IMHO is a big quality improvement over an old algorithm currently used by libgd (you can try it at http://tinypng.org ).
I've managed to integrate the library with libgd at code level, but I'm not submitting a patch yet, as I haven't figured out how to link with it properly.
I'm not sure what's your approach to handling external dependencies like this. I don't have OS-level package for the library, and I'm not familiar with cmake enough to figure out how to best integrate it.
The library is BSD-licensed and could be statically linked.
What would be your approach to integrating such library? Should I create a dynamically linked library as a package? Would you just copy the code to libgd or hook it as a submodule/subrepository? Or maybe cmake could download and build static version of the library?