Add GIF save support from libvips 8.12

This commit is contained in:
lucor 2022-01-11 14:51:12 +01:00
parent 78145aa405
commit 2f73f4d9e0
No known key found for this signature in database
GPG key ID: 5AB05891A4905007
4 changed files with 39 additions and 5 deletions

View file

@ -21,9 +21,18 @@ func TestImageResize(t *testing.T) {
}
func TestImageGifResize(t *testing.T) {
_, err := initImage("test.gif").Resize(300, 240)
if err == nil {
t.Errorf("GIF shouldn't be saved within VIPS")
if VipsMajorVersion >= 8 && VipsMinorVersion >= 12 {
buf, err := initImage("test.gif").Resize(300, 240)
if err != nil {
t.Errorf("Cannot process the image: %#v", err)
}
err = assertSize(buf, 300, 240)
if err != nil {
t.Error(err)
}
Write("testdata/test_resize_out.gif", buf)
}
}