Re sizing .jpg images in Python