-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmosaic-generator.py
37 lines (30 loc) · 899 Bytes
/
mosaic-generator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import subprocess
import sys
import time
from pathlib import Path
THISDIR = Path(__file__).parent
CLISDIR = THISDIR.parent / "clis"
CLIPATH = CLISDIR / "mosaic-generator.py"
INPUT_DIR = Path(r"G:\personal\photo\workspace\dcim\2023\2023_12_27_tarentaise")
DST_PATH = Path(r"Z:\packages-dev\lxmImageProcessing\tmp") / "mosaic2.jpg"
OIIOTOOL = Path(r"F:\softwares\apps\oiio\build\2.3.10\oiiotool.exe")
def main():
print(f"💬 processing '{INPUT_DIR.name}' ...")
command = [
sys.executable,
str(CLIPATH),
str(DST_PATH),
str(INPUT_DIR),
"--image-extensions",
"jpg",
"--oiiotool",
str(OIIOTOOL),
# "--anamorphic-desqueeze",
# "1.8",
]
stime = time.time()
subprocess.run(command)
etime = time.time()
print(f"✅ completed in {etime - stime:.2f}s ...")
if __name__ == "__main__":
main()