Process processes the image based on the given transformation options, talking with libvips bindings accordingly and returning the resultant image buffer.
(o Options)
| 200 | // talking with libvips bindings accordingly and returning the resultant |
| 201 | // image buffer. |
| 202 | func (i *Image) Process(o Options) ([]byte, error) { |
| 203 | image, err := Resize(i.buffer, o) |
| 204 | if err != nil { |
| 205 | return nil, err |
| 206 | } |
| 207 | i.buffer = image |
| 208 | return image, nil |
| 209 | } |
| 210 | |
| 211 | // Metadata returns the image metadata (size, alpha channel, profile, EXIF rotation). |
| 212 | func (i *Image) Metadata() (ImageMetadata, error) { |