title: Combine 3 separate numpy arrays to an RGB image in Python
body: <p>So I have a set of data which I am able to convert to form separate numpy arrays of R, G, B bands. Now I need to combine them to form an RGB image. </p>
  
  <p>I tried 'Image' to do the job but it requires 'mode' to be attributed. </p>
  
  <p>I tried to do a trick. I would use Image.fromarray() to take the array to image but it attains 'F' mode by default when Image.merge requires 'L' mode images to merge. If I would declare the attribute of array in fromarray() to 'L' at first place, all the R G B images become distorted.</p>
  
  <p>But, if I save the images and then open them and then merge, it works fine. Image reads the image with 'L' mode.</p>
  
  <p>Now I have two issues.</p>
  
  <p>First, I dont think it is an elegant way of doing the work. So if anyone knows the better way of doing it, please tell </p>
  
  <p>Secondly, Image.SAVE is not working properly. Following are the errors I face:</p>
  
  <pre><code>In [7]: Image.SAVE(imagefile, 'JPEG')
  ----------------------------------------------------------------------------------
  
  TypeError                                 Traceback (most recent call last)
  
  /media/New Volume/Documents/My own works/ISAC/SAMPLES/&lt;ipython console&gt; in &lt;module&gt;()
  
  TypeError: 'dict' object is not callable
  </code></pre>
  
  <p>Please suggest solutions.</p>
  
  <p>And please mind that the image is around 4000x4000 size array.</p>