title: how to write gray (1-channel) image with opencv for python
body: <p>I just would like to know if it's possible to save gray 1 channel images with opencv starting from rgb images. </p>
  
  <pre><code>import cv2
  bgr_img = cv2.imread('anyrgbimage.jpg')
  print(bgr_img.shape) #(x,y,3)
  gray_img = cv2.cvtColor(bgr_img,cv2.COLOR_BGR2GRAY)
  cv2.imwrite('hopefully_gray_image.jpg',gray_img)
  #cv2.imwrite('hopefully_gray_image.jpg',gray_img,[int(cv2.COLOR_BGR2GRAY)])
  buh_img = cv2.imread('hopefully_gray_image.jpg')
  print(buh_img.shape) #(x,y,3)
  </code></pre>
  
  <p>i know i can add some parameters inside cv2.imwrite, but i can't figure out what.</p>