image-pluser-webui/processing/stacking.py
2023-04-18 13:16:16 +03:00

17 lines
334 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]