I have a Go program where I want to take an animated .webp image, resize it and then write it to .webp again.
This worked flawlessly using imagemagick:
exec.Command("magick", tmpWebPFile, "-quality", "70", "-resize", resizeStr, "-layers", "coalesce", outputFile)
In order to gain some speed, I decided to try with libvisp:
vips webpsave animated.webp out.webp
Only thing that comes out is the first frame.
I tried using the github.com/davidbyttow/govips package:
image, _ := vips.NewImageFromFile(tmpWebPFile)
data, _, _ := image.Export(vips.NewDefaultWEBPExportParams())
os.WriteFile("test.webp", data, 0644)
Still just the first frame.
Any suggestions?
Ah, this did the trick: