def resize_image(image):
    (width, height) = image.size
    new_width = 256
    if (width < new_width):
        return image
    new_height = ((new_width * height) / width)
    return image.resize((new_width, int(new_height)), Image.ANTIALIAS)
def resize_image(image):
    (width, height) = image.size
    new_width = 256
    if (width < new_width):
        return image
    new_height = ((new_width * height) / width)
    return image.resize((new_width, int(new_height)), Image.ANTIALIAS)