title: Python: How to resize an image using PIL module
body: <p>I'm trying to resize an image to 500x500px but got this error: </p>
  
  <pre><code>File "C:\Python27\lib\site-packages\PIL\Image.py", line 1681, in save
       save_handler = SAVE[format.upper()] KeyError: 'JPG'
  </code></pre>
  
  <p>This is the code: </p>
  
  <pre><code>from PIL import Image
  img = Image.open('car.jpg')
  new_img = img.resize((500,500))
  new_img.save('car_resized','jpg')
  </code></pre>