mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-14 09:55:56 -07:00
fix(vips): memory inconsistency
This commit is contained in:
parent
bc88532806
commit
34dda8c57c
6 changed files with 51 additions and 8 deletions
10
image.go
10
image.go
|
|
@ -31,6 +31,16 @@ func (i *Image) Crop(width, height int) ([]byte, error) {
|
|||
return i.Process(options)
|
||||
}
|
||||
|
||||
func (i *Image) Thumbnail(pixels int) ([]byte, error) {
|
||||
options := Options{
|
||||
Width: pixels,
|
||||
Height: pixels,
|
||||
Crop: true,
|
||||
Quality: 95,
|
||||
}
|
||||
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