23 lines
354 B
Bash
Executable File
23 lines
354 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ $# -ne 2 ]; then
|
|
cat <<EOF>&2
|
|
Usage: ${0##*/} INPUT OUTPUT
|
|
|
|
Convert a PDF to a blurred, black & white raster image.
|
|
EOF
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f "$1" ]; then
|
|
echo >&2 "$1 is not a valid file."
|
|
exit 1
|
|
fi
|
|
|
|
if [ -e "$2" ]; then
|
|
echo >&2 "$2 exists."
|
|
exit 1
|
|
fi
|
|
|
|
convert -threshold 90% -blur 1x1 -quality 100 -flatten -density 400 "$1" "$2"
|