Commit b28431ec authored by Nigel Tao's avatar Nigel Tao

doc: simplify the image_draw article example for converting an image to

RGBA.

R=adg, r, bsiegert
CC=golang-dev
https://golang.org/cl/6119054
parent e4127614
...@@ -84,8 +84,8 @@ func ConvAndCircle() { ...@@ -84,8 +84,8 @@ func ConvAndCircle() {
// CONV OMIT // CONV OMIT
b := src.Bounds() b := src.Bounds()
m := image.NewRGBA(image.Rect(0, 0, b.Dx(), b.Dy())) m := image.NewRGBA(b)
draw.Draw(m, m.Bounds(), src, b.Min, draw.Src) draw.Draw(m, b, src, b.Min, draw.Src)
// STOP OMIT // STOP OMIT
p := image.Point{100, 100} p := image.Point{100, 100}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment