mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08: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
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue