mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -07:00
Merge pull request #119 from greut/jp2
feat: adding JPEG2000 file for the type tests
This commit is contained in:
commit
0dc959257f
3 changed files with 2 additions and 1 deletions
BIN
fixtures/test.jp2
Normal file
BIN
fixtures/test.jp2
Normal file
Binary file not shown.
|
|
@ -18,6 +18,7 @@ func TestDeterminateImageType(t *testing.T) {
|
|||
{"test.gif", GIF},
|
||||
{"test.pdf", PDF},
|
||||
{"test.svg", SVG},
|
||||
{"test.jp2", MAGICK},
|
||||
}
|
||||
|
||||
for _, file := range files {
|
||||
|
|
@ -42,6 +43,7 @@ func TestDeterminateImageTypeName(t *testing.T) {
|
|||
{"test.gif", "gif"},
|
||||
{"test.pdf", "pdf"},
|
||||
{"test.svg", "svg"},
|
||||
{"test.jp2", "magick"},
|
||||
}
|
||||
|
||||
for _, file := range files {
|
||||
|
|
|
|||
1
vips.go
1
vips.go
|
|
@ -531,7 +531,6 @@ func readImageType(buf []byte) string {
|
|||
length := C.size_t(len(buf))
|
||||
imageBuf := unsafe.Pointer(&buf[0])
|
||||
load := C.vips_foreign_find_load_buffer(imageBuf, length)
|
||||
defer C.free(imageBuf)
|
||||
return C.GoString(load)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue