Listing 1
#!/bin/sh
# wrapper for qvplay to get a specific picture -10
# from a QV assumes that qvplay is configured
# correctly and that 'mid' spped is OK
#
SPEED=mid
PORT=/dev/cua0"
VERBOSE=-v
FORMAT=jpeg
WIDTH=320
HEIGHT=240
prog=`basename $0`
usage() {
echo "Usage: $prog num" >&2
echo "Reads num'th picture from the Casio\
QV-10 digital camera to stdout" >&2
exit 1;
}
#
#Check at least one parameter
if [ "X$1" = "X" ]
then
usage
fi
qvplay -S $SPEED -D $PORT -F $FORMAT $VERBOSE -g\
$1 | djpeg | pnmscale -xsize $WIDTH -ysize\
$HEIGHT | cjpeg
qvplay -r
Copyright © 1994 - 2018 Linux Journal. All rights reserved.