master
Tomas Aparicio 11 years ago
parent 1a1ad46155
commit 9c6e6dcf34

@ -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)
}

@ -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

Loading…
Cancel
Save