Is there has method or lib to compress and resize a gif use golang?
ps: I was tried bimg, but it not support gif.
Is there has method or lib to compress and resize a gif use golang?
ps: I was tried bimg, but it not support gif.
see doc https://golang.org/pkg/image/gif/#GIF
func DecodeAll(r io.Reader) (*GIF, error)
now you can get a GIT struct
type GIF struct {
Image []*image.Paletted // The successive images.
then you can resize each of Image in GIF.
for _,img:=range gif.Image{
resize(img)
}
PS: image.Paletted implemented image.Image. so you can use https://github.com/nfnt/resize to do your job.