def deanimate(img):
    """Reduce an animation to its first frame."""
    if img.size[0] < img.size[1]:
        print('    Taking first frame of animation')
        return img.crop((0, 0, img.size[0], img.size[0]))
    return img