From 9f1f9f1ffc0a72ec4fe75c626689bd30d47c379e Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Thu, 4 Jul 2024 11:37:13 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20`convert`=20=E2=86=92=20`magick`,=20depr?= =?UTF-8?q?ecated=20in=20IM7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scanmultipage | 2 +- scanpage | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scanmultipage b/scanmultipage index bbe251d..b309567 100755 --- a/scanmultipage +++ b/scanmultipage @@ -103,7 +103,7 @@ done # concatenate scanned pages echo "Concatenating pages …" -convert "$_tmpdir/*.png" "${_file}" +magick "$_tmpdir/*.png" "${_file}" pushd $_tmpdir ps2pdf -dPDFSETTINGS=/ebook "${_file}" popd diff --git a/scanpage b/scanpage index 4f12bd1..2daacaf 100755 --- a/scanpage +++ b/scanpage @@ -3,7 +3,7 @@ ### : ' Scans a single page using sane’s `scanimage` and converts it to PDF using -ImageMagick’s `convert`. +ImageMagick. ' ### @@ -34,7 +34,7 @@ _silent=false _tmpdir="" usage () { - echo 'Scans a single page using sane’s `scanimage` and converts it to PDF using ImageMagick’s convert and opens it in Evince. + echo 'Scans a single page using sane’s `scanimage` and converts it to PDF using ImageMagick and opens it in Evince. options: -h, --help @@ -91,7 +91,7 @@ else _file="${_tmpdir}/$(date +%Y-%m-%d).pdf" 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 _cleanup