title: How can I save a image converted from Grayscale to RGB in Python?
body: <p>I'm new to work with Python and I'd like if there is how to save a image that I added an additional chanel.</p>
  
  <p>I imported openned an image and added 2 chanels of array of zeros to try to transform to an RBG image, but the I coudn't savaet as I save usually.</p>
  
  <pre><code>from PIL import Image
  import numpy as np
  from array import array
  
  i= Image.open('/content/drive/My Drive/DDICM19/imagens/mdb001.jpg')
  dim = np.zeros((1024,1024))
  R = np.stack((i,dim, dim), axis=2)
  dim = np.zeros((1024,1024))
  dim.save('/content/drive/My Drive/DDICM19/imagensP/teste.jpg')
  </code></pre>
  
  <p>It returned:</p>
  
  <pre><code>    AttributeError                            Traceback (most recent call last)
      &lt;ipython-input-32-073545b24d75&gt; in &lt;module&gt;()
            7 R = np.stack((i,dim, dim), axis=2)
            8 dim = np.zeros((1024,1024))
      ----&gt; 9 dim.save('/content/drive/My Drive/DDICM19/imagensP/teste.jpg')
  
  AttributeError: 'numpy.ndarray' object has no attribute 'save'
  </code></pre>
  
  <p>Somebody help.</p>