]>
git.scottworley.com Git - picsort/blob - pics-preprocess
780acdc794657b6f875e7aaee07d0c9f53fa2e90
3 # Pass .NEF and .jpeg files as $@.
4 # This makes many variants of each .NEF file at different exposure levels
5 # and makes reduced-size versions for faster browsing.
14 if [[ "$f" == *.NEF
]];then
15 for level
in {10.
.30};do
16 mkdir -p {,sm
/}"$level"
17 base
="$(basename "$f")"
18 out
="$level/${base%.NEF}.jpeg"
19 exposure
=$(dc <<< "2k $level 4 / 3.5-p") # 10 to 30 -> -1 to 4 in .25 steps
20 if [[ ! -s "$out" ]];then
21 ufraw
-batch --out-type=jpeg \
23 --temperature="$TEMPERATURE" \
24 --compression="$JPEGCOMPRESSION" \
25 --exposure="$exposure" \
29 if [[ ! -s "sm/$out" ]];then
30 convert
"$out" -geometry "x$SMALLHEIGHT" "sm/$out"
34 if [[ ! -s "sm/$f" ]];then
35 convert
"$f" -geometry "x$SMALLHEIGHT" "sm/$f"