From ca366ba15b61ba323a2e1723de68c265f2e350fc Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 15 Mar 2018 21:28:47 -0600 Subject: [PATCH] Start copying at bounds min instead of zero point --- util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util.go b/util.go index a530fcb..8c34809 100644 --- a/util.go +++ b/util.go @@ -54,8 +54,9 @@ func SavePNG(path string, im image.Image) error { } func imageToRGBA(src image.Image) *image.RGBA { - dst := image.NewRGBA(src.Bounds()) - draw.Draw(dst, dst.Rect, src, image.ZP, draw.Src) + bounds := src.Bounds() + dst := image.NewRGBA(bounds) + draw.Draw(dst, bounds, src, bounds.Min, draw.Src) return dst }