title: Convert Python image to Single Channel from RGB using PIL or Scipy
body: <p>Is there a known solution to convert images from having 3 channels (<strong>RGB</strong>) to having only one channel using PIL (or Scipy)</p>
  
  <p>I tried converting the image to <code>Grayscale</code> and saving as png as per the code below, the image still had 3 color channels. </p>
  
  <pre><code>from glob import glob
  import os
  import os.path
  from PIL import Image
  
  SIZE = 32, 32
  
  # set directory
  # os.chdir('..data/unprocessed_cats')
  
  # filter all jpg and png images
  IMAGE_FILES = glob('../data/validation/cats/*.jpg')
  
  IMAGE_COUNTER = 1
  print IMAGE_FILES
  # iterate over files
  for image_file in IMAGE_FILES:
  
      # open file and resize
      try:
          im = Image.open(image_file)
      except:
          pass
      im = im.resize(SIZE, Image.ANTIALIAS)
  
      # save locally
      output_filename = "%s.png" % IMAGE_COUNTER
      # Grayscale
      im.convert('LA').save(os.path.join('../data/validation', 'cats_processed', output_filename), "PNG")
  
  
      # incriment image counter
      IMAGE_COUNTER = IMAGE_COUNTER + 1
  </code></pre>