mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2024-11-05 20:23:58 +03:00
15 lines
325 B
Python
15 lines
325 B
Python
from methods.stack_methods import methods_funcs
|
|
import os
|
|
from processing.utils import generate_name
|
|
|
|
|
|
def stacking(dir, method):
|
|
files = os.listdir(dir)
|
|
files = list(map(lambda x: os.path.join(dir, x), files))
|
|
|
|
img = methods_funcs[method](files)
|
|
|
|
name = generate_name()
|
|
img.save(name)
|
|
|
|
return [name]
|