+ [ -z "$NEGATIVE" ] && src="Flatbed" || src="Transparency Adapter"
+ [ -z "$NEGATIVE" ] && depth=8 || depth=16
+ [ -z "$NEGATIVE" ] && resolution=800 || resolution=1600
+ if [ "$preview" = "yes" ]; then
+ depth=8
+ resolution=150
+ fi
+ scanimage \
+ --format=pnm \
+ --mode=Color \
+ --depth $depth \
+ --progress \
+ --resolution=$resolution \
+ --source="$src" \
+ $@ > tmp.ppm