title: How to force Pillow to resize an image to an arbitrary size?
body: <p>I need to resize images, from all different sizes to 144x144.</p>
  
  <p>All sizes: from 968x565, from 25x48, from 400x400, etc. Don't know the input. I'm using Pillow library from Python. I don't mind losing aspect ratio.</p>
  
  <p>Problem is: when using <code>resize</code> method, some images get complete random sizes. Not always, but just some of them don't respect the arbitrary size of 144x144 I gave to the method. <a href="http://imgur.com/DdxullE" rel="nofollow">Here is a sample</a>.</p>
  
  <p>I tried resizing these images using Mac OS X Yosemite's Preview and it works flawlessly. What do I need to do in Pillow to force 144x144 size and work at least like Preview in mac?</p>
  
  <p>I can't post the whole code, but the snippet that resizes is:</p>
  
  <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  from PIL import Image
  
  im = Image.open('canvas_wheat.jpg')
  im.resize((144, 144), Image.ANTIALIAS)
  im.save('144.jpg', optimize=True, quality=20)
  </code></pre>