mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-09 15:38:13 -07:00
19 lines
300 B
Go
19 lines
300 B
Go
package bimg
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestImageResize(t *testing.T) {
|
|
data, _ := os.Open("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)
|
|
}
|
|
}
|