X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/9952a1a7aaa0eb9254668d70b69d845f5f2fd984..fd69f56988c764cf5b190f130ecbe365de64b8ca:/pics-preprocess diff --git a/pics-preprocess b/pics-preprocess index 87eca8c..fde35d1 100755 --- a/pics-preprocess +++ b/pics-preprocess @@ -15,13 +15,17 @@ for f;do base="$(basename "$f")" out="$level/${base%.NEF}.jpeg" exposure=$(dc <<< "2k $level 4 / 3.5-p") # 10 to 30 -> -1 to 4 in .25 steps - ufraw-batch --out-type=jpeg \ - --green="$GREEN" \ - --temperature="$TEMPERATURE" \ - --compression="$JPEGCOMPRESSION" \ - --exposure="$exposure" \ - --output="$out" \ - "$f" - convert "$out" -geometry "x$SMALLHEIGHT" "sm/$out" + if [[ ! -s "$out" ]];then + ufraw-batch --out-type=jpeg \ + --green="$GREEN" \ + --temperature="$TEMPERATURE" \ + --compression="$JPEGCOMPRESSION" \ + --exposure="$exposure" \ + --output="$out" \ + "$f" + fi + if [[ ! -s "sm/$out" ]];then + convert "$out" -geometry "x$SMALLHEIGHT" "sm/$out" + fi done done