title: How do i convert an image read with cv2.imread('img.png',cv2.IMREAD_UNCHANGED) to the format of cv2.imread('img.png',cv2.IMREAD_COLOR)
body: <p>I'm trying to read an image in unchanged format, do some operations and convert it back to the colored format </p>
  
  <pre><code>im = cv2.imread(fname,cv2.IMREAD_UNCHANGED) # shape(240,240,4)
  ....
  im2 = cv2.imread(im,cv2.IMREAD_COLOR) # required shape(240,240,3)
  </code></pre>
  
  <p>But, looks like I can't input the result of first numpy array into the second imread.
  So currently I've created a temporary image after the operations and reading that value to get the required im2 value.</p>
  
  <pre><code>im = cv2.imread(fname,cv2.IMREAD_UNCHANGED) # shape(240,240,4)
  ....
  cv2.imwrite('img.png',im)
  im2 = cv2.imread('img.png',cv2.IMREAD_COLOR) # required shape(240,240,3)
  </code></pre>
  
  <p>However I would like to avoid the step of creating temporary image. How would I achieve the same with a better approach</p>