mirror of https://github.com/talgo-cloud/bimg.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
362 B
17 lines
362 B
// +build go1.7
|
|
|
|
package bimg
|
|
|
|
import (
|
|
"runtime"
|
|
)
|
|
|
|
// Resize is used to transform a given image as byte buffer
|
|
// with the passed options.
|
|
func Resize(buf []byte, o Options) ([]byte, error) {
|
|
// Required in order to prevent premature garbage collection. See:
|
|
// https://github.com/h2non/bimg/pull/162
|
|
defer runtime.KeepAlive(buf)
|
|
return resizer(buf, o)
|
|
}
|