given a filename or list of filenames,
    return a tuple or sequence of tuples (x, y, filename)

def dimensions(filenames):
    """given a filename or list of filenames,
    return a tuple or sequence of tuples (x, y, filename)"""

    single = type(filenames) is str
    if single:
        filenames = [filenames]
    dims = get_dimensions(filenames)
    if single:
        dims = dims[0]
    return dims