title: Fill Color of PIL Cropping/Thumbnailing
body: <p>I am taking an image file and thumbnailing and cropping it with the following PIL code:</p>
  
  <pre><code>        image = Image.open(filename)
          image.thumbnail(size, Image.ANTIALIAS)
          image_size = image.size
          thumb = image.crop( (0, 0, size[0], size[1]) )
          offset_x = max( (size[0] - image_size[0]) / 2, 0 )
          offset_y = max( (size[1] - image_size[1]) / 2, 0 )
          thumb = ImageChops.offset(thumb, offset_x, offset_y)                
          thumb.convert('RGBA').save(filename, 'JPEG')
  </code></pre>
  
  <p>This works great, except when the image isn't the same aspect ratio, the difference is filled in with a black color (or maybe an alpha channel?).  I'm ok with the filling, I'd just like to be able to select the fill color -- or better yet an alpha channel.</p>
  
  <p>Output example:</p>
  
  <p><img src="https://i.stack.imgur.com/uXLCV.jpg" alt="output"></p>
  
  <p>How can I specify the fill color?</p>