mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -07:00
feat(#26): support zoom. several refactors and fixes
This commit is contained in:
parent
e603ddd10a
commit
58b2be80a5
7 changed files with 62 additions and 16 deletions
6
image.go
6
image.go
|
|
@ -92,6 +92,12 @@ func (i *Image) Watermark(image []byte, left, top int) ([]byte, error) {
|
|||
return i.Process(options)
|
||||
}
|
||||
|
||||
// Zoom the image by the given factor
|
||||
func (i *Image) Zoom(level int) ([]byte, error) {
|
||||
options := Options{Zoom: level}
|
||||
return i.Process(options)
|
||||
}
|
||||
|
||||
// Rotate the image by given angle degrees (0, 90, 180 or 270)
|
||||
func (i *Image) Rotate(a Angle) ([]byte, error) {
|
||||
options := Options{Rotate: a}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue