title: Python/PIL Resize all images in a folder
body: <p>I have the following code that I thought would resize the images in the specified path
  But when I run it,  nothing works and yet python doesn't throw any error so I don't know what to do. Please advise. Thanks.</p>
  
  <pre><code>from PIL import Image
  import os, sys
  
  path = ('C:\Users\Maxxie\color\complete')
  
  def resize():
  for item in os.listdir(path):
      if os.path.isfile(item):
          im = Image.open(item)
          f, e = os.path.splitext(item)
          imResize = im.resize((200,200), Image.ANTIALIAS)
          imResize.save(f + ' resized.jpg', 'JPEG', quality=90)
  
  resize()
  </code></pre>