title: Cropping an image with Python Pillow
body: <p>I installed Python <a href="https://en.wikipedia.org/wiki/Python_Imaging_Library" rel="noreferrer">Pillow</a> and am trying to crop an image.</p>
  
  <p>Other effects work great (for example, thumbnail, blurring image, etc.)</p>
  
  <p>Whenever I run the code below I get the error:</p>
  
  <blockquote>
    <p>tile cannot extend outside image</p>
  </blockquote>
  
  <pre><code>test_image = test_media.file
  original = Image.open(test_image)
  
  width, height = original.size   # Get dimensions
  left = width/2
  top = height/2
  right = width/2
  bottom = height/2
  cropped_example = original.crop((left, top, right, bottom))
  
  cropped_example.show()
  </code></pre>
  
  <p>I used a cropping example I found for <a href="https://en.wikipedia.org/wiki/Python_Imaging_Library" rel="noreferrer">PIL</a>, because I couldn't find one for Pillow (which I assumed would be the same).</p>