For ImageMagick 6 <-> 7 compatibility.

The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"
This commit is contained in:
M.Zeinali 2024-07-11 15:20:23 +03:30 committed by mzeinali
parent 475e4abb40
commit bf264774c5
3 changed files with 16 additions and 0 deletions

View File

@ -13,6 +13,11 @@ image() {
fi fi
} }
# For ImageMagick 6 <-> 7 compatibility.
if type magick >/dev/null 2>&1; then
alias convert='magick'
fi
# Note that the cache file name is a function of file information, meaning if # Note that the cache file name is a function of file information, meaning if
# an image appears in multiple places across the machine, it will not have to # an image appears in multiple places across the machine, it will not have to
# be regenerated once seen. # be regenerated once seen.

View File

@ -1,4 +1,10 @@
#!/bin/sh #!/bin/sh
# For ImageMagick 6 <-> 7 compatibility.
if type magick >/dev/null 2>&1; then
alias convert='magick'
fi
while read -r file while read -r file
do do
case "$1" in case "$1" in

View File

@ -70,6 +70,11 @@ if [ -n "${audio+x}" ]; then
endtime="$((totseconds-seconds))" endtime="$((totseconds-seconds))"
fi fi
# For ImageMagick 6 <-> 7 compatibility.
if type magick >/dev/null 2>&1; then
alias convert='magick'
fi
prepdir="${prepdir:-$cache/$file}" prepdir="${prepdir:-$cache/$file}"
outfile="${outfile:-$file.mp4}" outfile="${outfile:-$file.mp4}"
prepfile="$prepdir/$file.prep" prepfile="$prepdir/$file.prep"