-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
raw-exr-converter.py
37 lines (33 loc) · 1.02 KB
/
raw-exr-converter.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 logging
import sys
from pathlib import Path
import lxmimgproc.tools.raw_exr_converter
from lxmimgproc.browse import get_dir_content
logging.basicConfig(
level=logging.DEBUG,
format="{levelname: <7} | {asctime} [{name}] {message}",
style="{",
stream=sys.stdout,
)
INPUT_PATHS = get_dir_content(
Path(r"G:\personal\photo\workspace\dcim\2024\2024_06_20_mshootsweat"),
file_extensions=[".dng"],
)
print(f"processing {len(INPUT_PATHS)} files")
for index, INPUT_PATH in enumerate(INPUT_PATHS):
print(f"{index+1}/{len(INPUT_PATHS)} ...")
DST_PATH = INPUT_PATH.with_stem("{input_filestem}.{preset}.{colorspace}")
DST_PATH = DST_PATH.with_suffix(".exr")
lxmimgproc.tools.raw_exr_converter.execute(
[
str(DST_PATH),
str(INPUT_PATH),
"--colorspace",
"@native",
"--preset",
"normal",
"--overwrite-existing",
"--exiftool",
r"F:\softwares\apps\exiftool\build\12.70\exiftool.exe",
]
)