h2non / bimg

Go package for fast high-level image processing powered by libvips C library
https://pkg.go.dev/github.com/h2non/bimg?tab=doc
MIT License
2.65k stars 337 forks source link

Does bimg support animated WebP resizing? #441

Open rtio opened 1 year ago

rtio commented 1 year ago

I'm performing some tests right now and static WebP image resizing works well, but when I'm trying to resize an animated WebP image it returns a frozen image, when I look at the image size it has reduced drastically which indicates it is just one frame.

I didn't find any explicit information regarding this, sorry if this is a repeated question.

        bimg.VipsDebugInfo()
        opt := bimg.Options{Width: 212, Height: 320, Embed: true, Type: bimg.WEBP, Lossless: true}
        newImg, err := bimg.NewImage(inputData).Process(opt)
        if err != nil {
            fmt.Fprintln(os.Stderr, err)
        }
        bimg.Write("new.webp", newImg)