title: Using Rasterio to save window image (as jpg)
body: <p>I'm trying to open an jpg (01.jpg) using Python Rasterio and save the Window as a jpg
  I can do it for 1 band, not not for the 3 bands of the RGB source image.
  the issue is with the band rearranging.
  below my code and the error :</p>
  
  <p>Source shape (2000, 2000, 3) is inconsistent with given indexes 1</p>
  
  <p>I tried to modify line code src = np.moveaxis(src, [0, 1, 2], [2, 1, 0])
  but I still have errors..
  can you please offer advice ?</p>
  
  <pre><code>import cv2
  import numpy as np
  import rasterio
  from rasterio.plot import show
  
  w =2000
  h = 2000
  tile = np.ones((w,h))
  cv2.imwrite('tile.jpg', tile)
  
  with rasterio.open('01.JPG') as src:
    src = src.read(window=Window(0, 0, w, h))
    show(src)
  
  with rasterio.open('tile.jpg', 'w', driver='GTiff',width=w, height=h, count=1,dtype=src.dtype) as tile:
    src = np.moveaxis(src, [0, 1, 2], [2, 1, 0])
    tile.write(src)
  </code></pre>