This library was taken from https://code.ivysaur.me/go-imagequant/.
The only code changes made are
- Change import paths to
github.com/1lann/imagequant. - Use
[]byteasNewImage'srgba32dataargument instead ofstring. GoImageToRgba32andRgb8PaletteToGoImageare taken fromcmd/gopngquant/main.goand replicated inImage.gosuch that it's available in the package.- Uses imagequant-sys from https://github.com/ImageOptim/libimagequant