Resize is used to transform a given image as byte buffer with the passed options.
(buf []byte, o Options)
| 9 | // Resize is used to transform a given image as byte buffer |
| 10 | // with the passed options. |
| 11 | func Resize(buf []byte, o Options) ([]byte, error) { |
| 12 | // Required in order to prevent premature garbage collection. See: |
| 13 | // https://github.com/h2non/bimg/pull/162 |
| 14 | defer runtime.KeepAlive(buf) |
| 15 | return resizer(buf, o) |
| 16 | } |