Compare commits

..

No commits in common. "3e8a474f13b9145330fd6a877a54eb778787484a" and "8817df15f0a24e741bc693f68505cef179e2d814" have entirely different histories.

1 changed files with 0 additions and 9 deletions

View File

@ -433,7 +433,6 @@ func (p *MemePlugin) applyBully(img, bullyImg image.Image) image.Image {
dst := image.NewRGBA(img.Bounds())
scaleFactor := p.c.GetFloat64("meme.bullyScale", 0.1)
position := p.c.GetString("meme.bullyPosition", "botright")
scaleFactor = float64(img.Bounds().Max.X) * scaleFactor / float64(bullyImg.Bounds().Max.X)
@ -448,14 +447,6 @@ func (p *MemePlugin) applyBully(img, bullyImg image.Image) image.Image {
w, h := bullyImg.Bounds().Max.X, bullyImg.Bounds().Max.Y
pt := image.Point{srcSz.X - w, srcSz.Y - h}
switch position {
case "botleft":
pt = image.Point{0, srcSz.Y - h}
case "topright":
pt = image.Point{srcSz.X - w, 0}
case "topleft":
pt = image.Point{0, 0}
}
rect := image.Rect(pt.X, pt.Y, srcSz.X, srcSz.Y)
draw.DrawMask(dst, rect, bullyImg, image.Point{}, &circle{image.Point{w / 2, h / 2}, w / 2}, image.Point{}, draw.Over)