from pathlib import Path


def get_files(dirname, extensions=['.png', '.tif', '.jpg']):

    """
    Gathers list of files for processing from path recursively.
    :param dirname: path to parse
    :param extensions: extensions to match
    :return: list of files matching extensions
    """
    dir_path = Path(dirname)

    files = dir_path.glob('**/*')

    files = [path.resolve() for path in files]

    match = [f for f in files if f.suffix.lower() in extensions]
    return match