summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7a7a7a7)
Move ufraw-batch invocation out into a separate file: pics-run-ufraw
+out="$destdir/$name $number.jpeg"
+
if [[ "$file" == *.NEF ]];then
base="${file%.NEF}"
if [[ "$rotate" ]];then
if [[ "$file" == *.NEF ]];then
base="${file%.NEF}"
if [[ "$rotate" ]];then
- echo "NEF rotation not yet implemented" >&2
- exit 1
+ numeric_exposure=$(dc <<< "2k $exposure 4 / 3.5-p")
+ pics-run-ufraw "$numeric_exposure" "$file" "$out" "$rotate"
- mv -vi "$exposure/$base.jpeg" "$destdir/$name $number.jpeg"
- mv -vi "$file" "$destdir/$name $number.NEF"
+ mv -vi "$exposure/$base.jpeg" "$out"
+ mv -vi "$file" "$destdir/$name $number.NEF"
else
if [[ "$rotate" ]];then
sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/&\n\"$name $number.jpeg\" => $rotate," "$destdir/rotations.php"
fi
else
if [[ "$rotate" ]];then
sed -i "s/^# ROBOTS_INSERT_THINGS_HERE\$/&\n\"$name $number.jpeg\" => $rotate," "$destdir/rotations.php"
fi
- mv -vi "$file" "$destdir/$name $number.jpeg"
# This makes many variants of each .NEF file at different exposure levels
# and makes reduced-size versions for faster browsing.
# This makes many variants of each .NEF file at different exposure levels
# and makes reduced-size versions for faster browsing.
-GREEN=1.105
-TEMPERATURE=5500
-JPEGCOMPRESSION=95
out="$level/${base%.NEF}.jpeg"
exposure=$(dc <<< "2k $level 4 / 3.5-p") # 10 to 30 -> -1 to 4 in .25 steps
if [[ ! -s "$out" ]];then
out="$level/${base%.NEF}.jpeg"
exposure=$(dc <<< "2k $level 4 / 3.5-p") # 10 to 30 -> -1 to 4 in .25 steps
if [[ ! -s "$out" ]];then
- ufraw-batch --out-type=jpeg \
- --green="$GREEN" \
- --temperature="$TEMPERATURE" \
- --compression="$JPEGCOMPRESSION" \
- --exposure="$exposure" \
- --output="$out" \
- "$f"
+ pics-run-ufraw "$exposure" "$f" "$out"
fi
if [[ ! -s "sm/$out" ]];then
convert "$out" -geometry "x$SMALLHEIGHT" "sm/$out"
fi
if [[ ! -s "sm/$out" ]];then
convert "$out" -geometry "x$SMALLHEIGHT" "sm/$out"
--- /dev/null
+#!/bin/bash
+
+GREEN=1.105
+TEMPERATURE=5500
+JPEGCOMPRESSION=95
+
+exposure=$1
+file=$2
+out=$3
+rotate=$4
+
+ufraw-batch --out-type=jpeg \
+ --green="$GREEN" \
+ --temperature="$TEMPERATURE" \
+ --compression="$JPEGCOMPRESSION" \
+ --exposure="$exposure" \
+ --output="$out" \
+ $( [[ "$rotate" ]] && echo --rotate="$rotate" ) \
+ "$file"