From 2e66c90aeed9e7274e05f60fad00523ca44b1636 Mon Sep 17 00:00:00 2001 From: axel paulander Date: Fri, 10 Jan 2020 01:14:53 +0100 Subject: [PATCH] op/paint: correct image loading Corrected the use of draw.Draw in paint.NewImageOp as the old use only works for images starting at the origin Signed-off-by: Axel Paulander --- op/paint/paint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op/paint/paint.go b/op/paint/paint.go index 77ec5704..296a75e2 100644 --- a/op/paint/paint.go +++ b/op/paint/paint.go @@ -59,7 +59,7 @@ func NewImageOp(src image.Image) ImageOp { dst := image.NewRGBA(image.Rectangle{ Max: sz, }) - draw.Draw(dst, src.Bounds(), src, image.Point{}, draw.Src) + draw.Draw(dst, dst.Bounds(), src, src.Bounds().Min, draw.Src) return ImageOp{ src: dst, handle: new(int),