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

@ -125,7 +125,7 @@ func TestIsTypeSupportedSave(t *testing.T) {
types := []struct {
name ImageType
}{
{JPEG}, {PNG}, {WEBP},
{JPEG}, {PNG}, {WEBP}, {GIF},
}
if VipsVersion >= "8.5.0" {
types = append(types, struct{ name ImageType }{TIFF})
@ -136,6 +136,9 @@ func TestIsTypeSupportedSave(t *testing.T) {
if VipsVersion >= "8.9.0" {
types = append(types, struct{ name ImageType }{AVIF})
}
if VipsVersion >= "8.12.0" {
types = append(types, struct{ name ImageType }{GIF})
}
for _, n := range types {
if IsTypeSupportedSave(n.name) == false {
@ -152,11 +155,11 @@ func TestIsTypeNameSupportedSave(t *testing.T) {
{"jpeg", true},
{"png", true},
{"webp", true},
{"gif", false},
{"pdf", false},
{"tiff", VipsVersion >= "8.5.0"},
{"heif", VipsVersion >= "8.8.0"},
{"avif", VipsVersion >= "8.9.0"},
{"gif", VipsVersion >= "8.12.0"},
}
for _, n := range types {