title: Gray scaled image from 1 channel to 3 channels, with the 2 extra channels made only by zeros
body: <p>Is it possible to make images with 1 channel to images with 3 channels by adding 2 channels that only contains zeros?</p>
  <p>This is the file with images that I want to convert to 3 channels images by adding 2 extra channels made only by zeros</p>
  <pre class="lang-py prettyprint-override"><code>images.shape
  (100, 120, 120, 1)
  
  </code></pre>
  <p>This is the code that I am using now to import images in 1 channel</p>
  <pre class="lang-py prettyprint-override"><code>def loadImages():
  
      dirname = '/c/disk/img_t1/'
      x_orig = np.zeros((100, 120, 120), dtype=np.float32) 
  
      for f in range(x_orig.shape[0]):
          img    = Image.open(dirname + 'img_t1_%05d.tiff' % (f))  
          img    = np.array(img)
          x_orig[f] = img
  
      
      path = '/c/labels.csv'    
      labels = pd.read_csv(path, usecols=[&quot;proportional&quot;, &quot;category&quot;],
                         sep=&quot;;&quot; )
      y_orig = np.array(labels['category'])
  
      return x_orig, y_orig
  
  
  x, y = loadImages()
  plt.imshow(x[3])
  
  </code></pre>
  <p>And this is how the image looks like</p>
  <p><img src="https://i.stack.imgur.com/ymyyT.png" alt="enter image description here" /></p>
  <p>And if from the same code I just add .convert('RGB) from the package PIL to add the other 2 channels</p>
  <pre class="lang-py prettyprint-override"><code>def loadImages():
  
      dirname = '/c/disk/img_t1/'
      x_orig = np.zeros((100, 120, 120,3), dtype=np.float32) 
  
      for f in range(x_orig.shape[0]):
          img    = Image.open(dirname + 'img_t1_%05d.tiff' % (f)).convert('RGB')  
          img    = np.array(img)
          x_orig[f] = img
  
      
      path = '/c/labels.csv'    
      labels = pd.read_csv(path, usecols=[&quot;proportional&quot;, &quot;category&quot;],
                         sep=&quot;;&quot; )
      y_orig = np.array(labels['category'])
  
      return x_orig, y_orig
  
  
  x, y = loadImages()
  plt.imshow(x[3])
  
  </code></pre>
  <p>The image looks like this</p>
  <p><img src="https://i.stack.imgur.com/PtTJy.png" alt="enter image description here" /></p>
  <p>So I would like something like this</p>
  <pre class="lang-py prettyprint-override"><code>images.shape
  (100, 120, 120, 3)
  
  </code></pre>