1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-04-12 06:58:15 +02:00

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

This commit is contained in:
realsim 2019-12-27 09:19:14 +03:00 committed by Sergey Alexandrovich
parent 8b87504d06
commit f83b73ab38

View File

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