title: Python Image Library and KeyError: 'JPG'
body: <p>This works:</p>
  
  <pre><code>from PIL import Image, ImageFont, ImageDraw
  
  def create_image_file(name='test.jpeg', ext='jpeg', size=(500, 500), color=(5, 179, 200)):
      file_obj = open(name, 'w')
      image = Image.new("RGBA", size=size, color=color)
      usr_font = ImageFont.truetype(
          "/Users/myuser/ENV/lib/python3.5/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf", 59)
      d_usr = ImageDraw.Draw(image)
      d_usr = d_usr.text((105, 280), "Test Image", (0, 0, 0), font=usr_font)
      image.save(file_obj, ext)
      file_obj.close()
  
  if __name__ == '__main__':
      f = create_image_file()
  </code></pre>
  
  <p>But if I change the arguments to:</p>
  
  <pre><code>def create_image_file(name='test.jpg', ext='jpg', ...)
  </code></pre>
  
  <p>An exception is raised: </p>
  
  <pre><code>File "/Users/myuser/project/venv/lib/python2.7/site-packages/PIL/Image.py", line 1681, in save
      save_handler = SAVE[format.upper()]
  KeyError: 'JPG'
  </code></pre>
  
  <p>And I need to work with user uploaded images that have <code>.jpg</code> as the extension.  Is this a Mac specific problem?  Is there something I can do to add the format data to the Image lib?</p>