mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-10 16:00:26 -07:00
parent
58b2be80a5
commit
cc2290cb45
8 changed files with 305 additions and 88 deletions
15
image.go
15
image.go
|
|
@ -75,20 +75,9 @@ func (i *Image) Thumbnail(pixels int) ([]byte, error) {
|
|||
return i.Process(options)
|
||||
}
|
||||
|
||||
// Insert an image. Alias to Watermark()
|
||||
func (i *Image) Insert(image []byte, left, top int) ([]byte, error) {
|
||||
return i.Watermark(image, left, top)
|
||||
}
|
||||
|
||||
// Insert an image to the existent one as watermark
|
||||
func (i *Image) Watermark(image []byte, left, top int) ([]byte, error) {
|
||||
options := Options{
|
||||
Insert: Insert{
|
||||
Buffer: image,
|
||||
Top: top,
|
||||
Left: left,
|
||||
},
|
||||
}
|
||||
func (i *Image) Watermark(w Watermark) ([]byte, error) {
|
||||
options := Options{Watermark: w}
|
||||
return i.Process(options)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue