1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#! /usr/bin/env sh
# https://github.com/michelerenzullo/LUTify/blob/main/LUTify.py
# -----
# diff --git a/LUTify.py b/LUTify.py
# index 71983ac..24020db 100644
# --- a/LUTify.py
# +++ b/LUTify.py
# @@ -162,7 +162,8 @@ if args.input.lower().endswith((".cube",".png",".jpg",".jpeg",".tiff")) and args
# title = re.search("[^\\\/]+(?=\.[\w]+$)",args.input)[0]
# if args.input.lower().endswith(".cube"):
# file = open(args.input,'r').read()
# - o_array = np.array([i.lower().replace(',', '').split() for i in re.findall("\n[+-]?[0-9]*[.]?[0-9]+\s[+-]?[0-9]*[.]?[0-9]+\s[+-]?[0-9]*[.]?[0-9]+",file)],dtype=float).reshape(-1)
# + mfloat = "[+-]?[0-9]*[.]?[0-9]*[eE]?[+-]?[0-9]+"
# + o_array = np.array([i.lower().replace(',', '').split() for i in re.findall(f"\n{mfloat}\s{mfloat}\s{mfloat}",file)],dtype=float).reshape(-1)
# lutSize = int(re.search("_SIZE.*?(\d+)",file).group(1))
# input_title = re.search("TITLE.?[\"'](.*?)[\"']",file)
# del file
# -----
for var in "$@"; do
python3 LUTify.py -i "$var" -o "$var.32.cube" -s 32 -m tetrahedral
done
|