title: How to write PNG in rasterio from a stacked RGB?
body: <p>I have 3 variables namely R, G, B. I want to make a PNG image based on the three using rasterio. I tried using np.dstack to stack the 3 images and use the result to write it.</p>
  <p>Using rasterio, I tried to write it this way:</p>
  <pre><code>rgb = np.dstack((Nr,Ng,Nb))  
  finame = &quot;Image_RGB.png&quot;
  with rasterio.Env():
      with rasterio.open(finame, 'w',
          driver='PNG',
          height=rgb.shape[0],
          width=rgb.shape[1],
          count=1,
          dtype=rgb.dtype,
          nodata=0,
          compress='deflate') as dst:
          dst.write(rgb, 1)
  </code></pre>
  <p>But I get this error:</p>
  <pre><code>ValueError: Source shape (1, 830, 793, 3) is inconsistent 
  with given indexes 1
  </code></pre>