def is_image_file(filename):
    """ Return true if the file is an image. """
    filename_lower = filename.lower()

    return any(filename_lower.endswith(extension) for extension in ['.png', '.jpg', '.bmp', '.mat'])