mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -07:00
feat: support multiple outputs
This commit is contained in:
parent
d471c49348
commit
ef10d7d7ec
9 changed files with 220 additions and 58 deletions
20
image_test.go
Normal file
20
image_test.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package bimg
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestImageResize(t *testing.T) {
|
||||
data, _ := os.Open(path.Join("fixtures/test.jpg"))
|
||||
buf, err := ioutil.ReadAll(data)
|
||||
|
||||
image := NewImage(buf)
|
||||
|
||||
buf, err = image.Resize(300, 240)
|
||||
if err != nil {
|
||||
t.Errorf("Cannot process the image: %#v", err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue