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
[]byte
asNewImage
'srgba32data
argument instead ofstring
. GoImageToRgba32
andRgb8PaletteToGoImage
are taken fromcmd/gopngquant/main.go
and replicated inImage.go
such that it's available in the package.- Uses imagequant-sys from https://github.com/ImageOptim/libimagequant