' "$@"
}
+ls_img_black() {
+
+ declare threshold; threshold=10
+ shell_help_noarg "Usage: $FUNCNAME [-threshold PCENT (default: $threshold)] IMG1 IMG2 ..." "$@" && return
+
+ while [ $# -gt 0 ]; do
+ if [ "$1" = "-threshold" ]; then
+ threshold=$2; shift 2; continue
+ fi
+ #colors=$(convert $1 -format "%[mean]" info:-)
+ convert "$1" -threshold ${threshold}% -format %c histogram:info:- | grep -qm1 white || echo "$1"
+ shift
+ done
+}
+
jpg2avi() {
shell_help_noarg "Usage: $FUNCNAME [-h] JPG_FILES AVI_FILE" "$@" && return
declare still; still=/tmp/$FUNCNAME.$$.txt; [ -x /dev/shm ] && tmp=/dev/shm/$FUNCNAME.$$.txt
- #declare still; still=$FUNCNAME.txt
+
+ declare avi jpg
+
declare tot; tot=$#
declare count; count=0
- declare avi; #avi=${@:$#}
- declare jpg; #jpg=${@:1:$(($# - 1))}
-
while [ $# -gt 0 ]; do
count=$(($count+1))
if [ "$count" = "$tot" ]; then
avi="$1"; shift; break
fi
-
echo "$1" >> "$still"
+
shift
done
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -mf type=jpeg:fps=24 mf://@${still} -o $avi
rm -f "$still"
}
+
+