Fix for memory issue when watermarking images

This commit is contained in:
Albert-Jan de Vries 2017-03-31 09:28:55 +02:00
parent 7cb8aa33c4
commit ff7970929b
4 changed files with 45 additions and 117 deletions

View file

@ -354,13 +354,7 @@ func watermarkImageWithAnotherImage(image *C.VipsImage, w WatermarkImage) (*C.Vi
w.Opacity = 1.0
}
watermark, _, err := loadImage(w.Buf)
if err != nil {
return nil, err
}
image, err = vipsDrawWatermark(image, watermark, w)
image, err := vipsDrawWatermark(image, w)
if err != nil {
return nil, err