def get_thumbnail_image(img, width, height, **options):
    """get thumbnail image

    Attribute:
        img -- PIL image instance
        width -- width of thumbnail
        height -- height of thumbnail
        kwargs -- Options used in PIL thumbnail method

    Usage::
        >>> from thumbnailfield.compatibility import Image
        >>> img = Image.new('RGBA', (1000, 800))
        >>> thumb = get_thumbnail_image(img, 100, 100)
        >>> assert thumb.size[0] == 100
        >>> assert thumb.size[1] == 80
    """
    thumbs = img.copy()
    thumbs.thumbnail(size=(width, height), **options)
    return thumbs
