mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 03:06:41 -07:00
refactor(resize): simplify code
This commit is contained in:
parent
d4ebbaa875
commit
6ee9b69627
1 changed files with 1 additions and 6 deletions
|
|
@ -118,12 +118,7 @@ func Resize(buf []byte, o Options) ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally get the resultant buffer
|
// Finally get the resultant buffer
|
||||||
buf, err = vipsSave(image, saveOptions)
|
return vipsSave(image, saveOptions)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func applyDefaults(o *Options, imageType ImageType) {
|
func applyDefaults(o *Options, imageType ImageType) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue