image-pluser-webui/processing/stacking.py
2023-04-30 21:01:03 +03:00

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]