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 }