def resize_image(image, percent):
    """ Resize an image to a scale amount.

    image: (PIL.Image) The image to scale.

    percent: (float) The percentage of the original size to scale to.

    Returns the scaled image.
    """
    if percent == 100:
        return image
    prop = percent / 100.0
    (width, height) = image.size
    return image.resize( (int(width * prop), int(height * prop)) )