mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 03:06:41 -07:00
refactor: bindings
This commit is contained in:
parent
d6f8ad617b
commit
206a1efc66
6 changed files with 129 additions and 47 deletions
8
image.go
8
image.go
|
|
@ -31,6 +31,14 @@ func (i *Image) Crop(width int, height int) ([]byte, error) {
|
|||
return i.Process(options)
|
||||
}
|
||||
|
||||
func (i *Image) Thumbnail(width int, height int) ([]byte, error) {
|
||||
options := Options{
|
||||
Width: width,
|
||||
Height: height,
|
||||
}
|
||||
return i.Process(options)
|
||||
}
|
||||
|
||||
func (i *Image) Rotate(a Angle) ([]byte, error) {
|
||||
options := Options{Rotate: a}
|
||||
return i.Process(options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue