Example #1
0
func imageConvert(src image.Image, dest draw.Image) draw.Image {
	w, h := src.Bounds().Dx(), src.Bounds().Dy()
	for y := 0; y < h; y += 1 {
		for x := 0; x < w; x += 1 {
			dest.Set(x, y, dest.ColorModel().Convert(src.At(x, y)))
		}
	}
	return dest
}