title: How to add a simple text label to an image in Go?
body: <p>Given <code>image.RGBA</code>, coordinates, and a line of text, how do I add a simple label with any plain fixed font? E.g. <code>Face7x13</code> from <a href="https://godoc.org/golang.org/x/image/font/basicfont" rel="noreferrer"><code>font/basicfont</code></a>.</p>
  
  <pre><code>package main
  
  import (
      "image"
      "image/color"
      "image/png"
      "os"
  )
  
  func main() {
      img := image.NewRGBA(image.Rect(0, 0, 320, 240))
      x, y := 100, 100
      addLabel(img, x, y, "Test123")
      png.Encode(os.Stdout, img)
  }
  
  func addLabel(img *image.RGBA, x, y int, label string) {
       col := color.Black
       // now what?
  }
  </code></pre>
  
  <p>Alignment doesn't really matter, but best if I could write the label above a line which starts at the coordinates.</p>
  
  <p>And I would like to avoid external loadable dependencies like fonts.</p>