Skip to content

Commit

Permalink
Merge pull request #79 from alessandroberna/master
Browse files Browse the repository at this point in the history
Fix ImageMagick 6/7 compatibility
  • Loading branch information
hackerb9 authored Jun 12, 2024
2 parents 69d14a4 + cc92065 commit 2b7c9e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lsix
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ if [[ ${BASH_VERSINFO[0]} -eq 3 ]]; then
fi
fi

magick=$(type -p magick) # For ImageMagick 6 <-> 7 compatibility.
# For ImageMagick 6 <-> 7 compatibility.
magick=$(type -p magick)
if [[ ! $magick ]]; then
convert="convert"
else
convert="$magick"
fi

if ! command -v $magick montage >/dev/null; then
echo "Please install ImageMagick" >&2
Expand Down Expand Up @@ -101,7 +107,7 @@ autodetect() {
You may test your terminal by viewing a single image, like so:
$magick convert foo.jpg -geometry 800x480 sixel:-
$convert foo.jpg -geometry 800x480 sixel:-
If your terminal actually does support sixel, please file a bug
report at http://github.com/hackerb9/lsix/issues
Expand Down Expand Up @@ -240,7 +246,7 @@ main() {
shift
done
$magick montage "${onerow[@]}" $imoptions gif:- \
| $magick convert - -colors $numcolors sixel:-
| $convert - -colors $numcolors sixel:-
done
}

Expand Down

0 comments on commit 2b7c9e7

Please sign in to comment.