From d3a64c89a7b5dd9878a46ab6bceeab6362526be4 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Thu, 25 Jun 2026 21:36:21 -0400 Subject: LUTs wip Signed-off-by: Andrew Opalach --- Scripts/convert_luts.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 Scripts/convert_luts.sh (limited to 'Scripts') diff --git a/Scripts/convert_luts.sh b/Scripts/convert_luts.sh new file mode 100755 index 0000000..4778b02 --- /dev/null +++ b/Scripts/convert_luts.sh @@ -0,0 +1,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 -- cgit v1.2.3-101-g0448