Skip to content
Permalink
Browse files

Use image height to calculate watermark top offset (#313)

  • Loading branch information
realsim authored and DarthSim committed Dec 27, 2019
1 parent 8b87504 commit f83b73ab38cfee21636dfcdc5106889bda59c08d
Showing with 1 addition and 1 deletion.
  1. +1 −1 process.go
@@ -261,7 +261,7 @@ func prepareWatermark(wm *vipsImage, wmData *imageData, opts *watermarkOptions,
return wm.Replicate(imgWidth, imgHeight)
}

left, top := calcPosition(imgWidth, imgWidth, wm.Width(), wm.Height(), &opts.Gravity, true)
left, top := calcPosition(imgWidth, imgHeight, wm.Width(), wm.Height(), &opts.Gravity, true)

return wm.Embed(imgWidth, imgHeight, left, top, rgbColor{0, 0, 0})
}

0 comments on commit f83b73a

Please sign in to comment.
You can’t perform that action at this time.