Example #1
0
def simple(image_dir, target_filename, dimensions, output_file):
    "A convenient wrapper for producing a traditional photomosaic."
    pool = SqlImagePool('temp.db')
    pool.add_directory(image_dir)
    
    p = Photomosaic(target_filename, pool)
    p.partition_tiles(dimensions)
    p.match()
    p.assemble()
    p.save(output_file)
    
    pool.close()
Example #2
0
def get_database(args):
    from sql_image_pool import SqlImagePool
    pool = SqlImagePool(args.database)
    for folder in args.folders:
        pool.add_directory(folder)
    return pool