unix - Shell script for timelapse photo stitch doesnt work -
first of all, new scripting , coding in general. please patient understandings.
little background: found 2 shell scripts (unix) online timelapse photo project working on. script should slice vertical strip off every image , stitch 1 image. since use windows, running scripts in cygwin.
to problem: none of 2 scripts work me. both of them should same. different ways job. cant seem work. error "event not found" (version 1) or "ivalid paramteter" (version 2). altered code fit image resolutions , determine width , heigth of slices correctly.
the scripts:
version 2:
tmpdir=tmp if [ -d "$tmpdir" ]; rm -rf $tmpdir fi mkdir $tmpdir height=2592 width=10 n=0 f in *.jpg offset=$(($n*$width)) c="$(printf "%05d" $n)" echo "creating slice $tmpdir/$c.png" convert -crop ${width}x${height}+${offset}+0 $f $tmpdir/$c.png n=$(($n+1)) done count="$(ls -1 $tmpdir | wc -l)" echo "joining $count slices out.png" montage $tmpdir/*.png -mode concatenate -tile ${count}x out.png
could please me?
thanks in advance!
Comments
Post a Comment