fix(test)

This commit is contained in:
Tomas Aparicio 2015-04-07 00:22:13 +02:00
parent 1a1ad46155
commit 9c6e6dcf34
2 changed files with 5 additions and 1 deletions

View file

@ -46,7 +46,7 @@ func TestImageRotate(t *testing.T) {
}
func TestImageConvert(t *testing.T) {
buf, err := initImage("test_rotate_out.jpg").Convert(PNG)
buf, err := initImage("test.jpg").Convert(PNG)
if err != nil {
t.Errorf("Cannot process the image: %#v", err)
}

View file

@ -15,6 +15,10 @@ import (
func Resize(buf []byte, o Options) ([]byte, error) {
defer C.vips_thread_shutdown()
if len(buf) == 0 {
return nil, errors.New("Image buffer is empty")
}
image, imageType, err := vipsRead(buf)
if err != nil {
return nil, err