Add support for image watermarks

This commit is contained in:
Jaume Pinyol 2017-01-24 19:14:34 +01:00
parent 2ccb6aa8a7
commit 1a661e4e52
9 changed files with 325 additions and 26 deletions

View file

@ -124,6 +124,12 @@ func (i *Image) Watermark(w Watermark) ([]byte, error) {
return i.Process(options)
}
// WatermarkImage adds image as watermark on the given image.
func (i *Image) WatermarkImage(w WatermarkImage) ([]byte, error) {
options := Options{WatermarkImage: w}
return i.Process(options)
}
// Zoom zooms the image by the given factor.
// You should probably call Extract() before.
func (i *Image) Zoom(factor int) ([]byte, error) {