title: How do I create a transparent gif in Go?
body: <p>when I encode a gif in Go, the background is all black. How do I make the background transparent?</p>
  
  <p>Here is some code in my http handler. (w is the responseWriter)</p>
  
  <pre><code>m := image.NewRGBA(image.Rect(0, 0, pixelWidth, pixelHeight))
  gif.Encode(w, m, &amp;gif.Options{NumColors: 16}) 
  </code></pre>