How to force Pillow to resize an image to an arbitrary size?
Question: I need to resize images, from all different sizes to 144x144.

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.

Problem is: when using `resize` 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. [Here is a sample](http://imgur.com/DdxullE).

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?

I can't post the whole code, but the snippet that resizes is:

    
    
    #!/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)
    


Answer: The problem you are getting there is that the `resize` method returns a _new_
image object, you are not storing anywhere. The original image `im` is the
same that has been loaded.

Check the examples on this interactive session:

    
    
    >>> from PIL import Image
    >>> img = Image.open("image.jpg")
    >>> img.size
    (952, 804)
    >>> img2 = img.resize((144,144), Image.ANTIALIAS)
    >>> img.size
    (952, 804)
    >>> img2.size
    (144, 144)
    >>> 
    

