mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-15 10:25:55 -07:00
Adding GIF, PDF and SVG support (libvips 8.3)
This commit is contained in:
parent
308a36afc6
commit
6b76a33673
15 changed files with 843 additions and 11 deletions
11
type_test.go
11
type_test.go
|
|
@ -15,6 +15,9 @@ func TestDeterminateImageType(t *testing.T) {
|
|||
{"test.jpg", JPEG},
|
||||
{"test.png", PNG},
|
||||
{"test.webp", WEBP},
|
||||
{"test.gif", GIF},
|
||||
{"test.pdf", PDF},
|
||||
{"test.svg", SVG},
|
||||
}
|
||||
|
||||
for _, file := range files {
|
||||
|
|
@ -36,6 +39,9 @@ func TestDeterminateImageTypeName(t *testing.T) {
|
|||
{"test.jpg", "jpeg"},
|
||||
{"test.png", "png"},
|
||||
{"test.webp", "webp"},
|
||||
{"test.gif", "gif"},
|
||||
{"test.pdf", "pdf"},
|
||||
{"test.svg", "svg"},
|
||||
}
|
||||
|
||||
for _, file := range files {
|
||||
|
|
@ -53,7 +59,7 @@ func TestIsTypeSupported(t *testing.T) {
|
|||
types := []struct {
|
||||
name ImageType
|
||||
}{
|
||||
{JPEG}, {PNG}, {WEBP},
|
||||
{JPEG}, {PNG}, {WEBP}, {GIF}, {PDF},
|
||||
}
|
||||
|
||||
for _, n := range types {
|
||||
|
|
@ -71,7 +77,8 @@ func TestIsTypeNameSupported(t *testing.T) {
|
|||
{"jpeg", true},
|
||||
{"png", true},
|
||||
{"webp", true},
|
||||
{"gif", false},
|
||||
{"gif", true},
|
||||
{"pdf", true},
|
||||
}
|
||||
|
||||
for _, n := range types {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue