mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-13 01:10:29 -07:00
Add GIF save support from libvips 8.12
This commit is contained in:
parent
78145aa405
commit
2f73f4d9e0
4 changed files with 39 additions and 5 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue