feat(#27, #25): new features

This commit is contained in:
Tomas Aparicio 2015-04-11 02:49:11 +02:00
parent 58b2be80a5
commit cc2290cb45
8 changed files with 305 additions and 88 deletions

View file

@ -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)
}