Browse Source

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

realsim 5 years ago
parent
commit
f83b73ab38
1 changed files with 1 additions and 1 deletions
  1. 1 1
      process.go

+ 1 - 1
process.go

@@ -261,7 +261,7 @@ func prepareWatermark(wm *vipsImage, wmData *imageData, opts *watermarkOptions,
 		return wm.Replicate(imgWidth, imgHeight)
 		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})
 	return wm.Embed(imgWidth, imgHeight, left, top, rgbColor{0, 0, 0})
 }
 }