refactor(resize): simplify code

This commit is contained in:
Tomás Aparicio 2015-11-03 07:49:05 +00:00
parent d4ebbaa875
commit 6ee9b69627

View file

@ -118,12 +118,7 @@ func Resize(buf []byte, o Options) ([]byte, error) {
}
// Finally get the resultant buffer
buf, err = vipsSave(image, saveOptions)
if err != nil {
return nil, err
}
return buf, nil
return vipsSave(image, saveOptions)
}
func applyDefaults(o *Options, imageType ImageType) {