ls_img_black() {
declare threshold; threshold=10
- shell_help_noarg "Usage: $FUNCNAME [-threshold PCENT (default: $threshold)] IMG1 IMG2 ..." "$@" && return
+ declare ret; ret=1
+
+ shell_help_noarg "Usage: $FUNCNAME [-threshold PCENT (default: $threshold)] IMG1 IMG2 ..." "$@" && return 1
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"
+
+ if ! convert "$1" -threshold ${threshold}% -format %c histogram:info:- | grep -qm1 white; then
+ echo "$1"
+ ret=0
+ fi
shift
+
done
+
+ return $ret
}
jpg2avi() {