From: paul Date: Mon, 10 Dec 2012 22:38:36 +0000 (+0000) Subject: bugfix for magenta cyan parameter parsing, also change working of vjust and hjust... X-Git-Url: http://git.plutz.net/?p=stereofy;a=commitdiff_plain;h=88e97b55f03b5bcb3d12b673f74a1e68296060cd bugfix for magenta cyan parameter parsing, also change working of vjust and hjust to be more intuitive svn path=/trunk/; revision=9 --- diff --git a/stereofy.sh b/stereofy.sh index 9b54bb7..4e2da59 100755 --- a/stereofy.sh +++ b/stereofy.sh @@ -32,7 +32,7 @@ while [ -n "$1" ]; do case "$1" in -d|--dubois) algo="d";; -f|--full|--full-color) algo="f";; - -h|--half|--half-color) algo="d";; + -h|--half|--half-color) algo="h";; -rc|--rc|--red-cyan) model="rc";; -mc|--mc|--magenta-cyan) model="mc";; -gm|--gm|--green-magenta) model="gm";; @@ -52,6 +52,13 @@ while [ -n "$1" ]; do esac shift 1; done + +if [ "$model" = 'mc' -a "$algo" != 'f' ]; then + echo 'INFO: using experimental color optimizations for magenta cyan anaglyph images.' + echo ' Specify --full to generate a full-color magenta cyan image.' + algo="e" +fi + if (echo $vert |egrep -qx '[+-]*[0-9]*[02468]'); then true else echo 'vertical alignment must be an even number' @@ -73,17 +80,17 @@ height=$(echo $geom |cut -dx -f2) if [ "$vert" -gt 0 ]; then height=$(($height - $vert / 2)) - lvoff=$(($vert / 3)) + rvoff=$(($vert / 2)) elif [ "$vert" -lt 0 ]; then height=$(($height - $vert / -2)) - rvoff=$(($vert / -2)) + lvoff=$(($vert / -2)) fi if [ "$hor" -gt 0 ]; then width=$(($width - $hor / 2)) - lhoff=$(($hor / 2)) + rhoff=$(($hor / 2)) elif [ "$hor" -lt 0 ]; then width=$(($width - $hor / -2)) - rhoff=$(($hor / -2)) + lhoff=$(($hor / -2)) fi geom="${width}x${height}" lcrop="${geom}+${lhoff}+${lvoff}"