def copy_image(image):
    """
    Copies an image, preserving format.

    @param image: PIL Image
    @type  image: PIL Image

    @return: Copy of PIL Image
    @rtype: PIL Image
    """
    img_format = image.format
    image = image.copy()
    image.format = img_format
    return image