fix: convertmagick, deprecated in IM7

This commit is contained in:
alterNERDtive 2024-07-04 11:37:13 +02:00
parent 50e916091c
commit 9f1f9f1ffc
Signed by: alterNERDtive
GPG key ID: E07E88A4921AC397
2 changed files with 4 additions and 4 deletions

View file

@ -103,7 +103,7 @@ done
# concatenate scanned pages # concatenate scanned pages
echo "Concatenating pages …" echo "Concatenating pages …"
convert "$_tmpdir/*.png" "${_file}" magick "$_tmpdir/*.png" "${_file}"
pushd $_tmpdir pushd $_tmpdir
ps2pdf -dPDFSETTINGS=/ebook "${_file}" ps2pdf -dPDFSETTINGS=/ebook "${_file}"
popd popd

View file

@ -3,7 +3,7 @@
### ###
: ' : '
Scans a single page using sanes `scanimage` and converts it to PDF using Scans a single page using sanes `scanimage` and converts it to PDF using
ImageMagicks `convert`. ImageMagick.
' '
### ###
@ -34,7 +34,7 @@ _silent=false
_tmpdir="" _tmpdir=""
usage () { usage () {
echo 'Scans a single page using sanes `scanimage` and converts it to PDF using ImageMagicks convert and opens it in Evince. echo 'Scans a single page using sanes `scanimage` and converts it to PDF using ImageMagick and opens it in Evince.
options: options:
-h, --help -h, --help
@ -91,7 +91,7 @@ else
_file="${_tmpdir}/$(date +%Y-%m-%d).pdf" _file="${_tmpdir}/$(date +%Y-%m-%d).pdf"
fi fi
scanimage -d "$_device" -p --resolution 300 --mode Color -x 210 -y 297 --format=png | convert $( ( $_landscape ) && print "\-rotate \-90 ")- $_file && \ scanimage -d "$_device" -p --resolution 300 --mode Color -x 210 -y 297 --format=png | magick $( ( $_landscape ) && print "\-rotate \-90 ")- $_file && \
( $_silent ) || $_viewer $_file >/dev/null 2>/dev/null ( $_silent ) || $_viewer $_file >/dev/null 2>/dev/null
_cleanup _cleanup