From d3438d98a0990e1ee40ad285d0e7800b9c818e12 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Tue, 18 Feb 2025 09:50:30 -0500 Subject: [PATCH] Updated Imagemagick scripts --- scripts/getLLA.sh | 14 +++++++------- scripts/jpg4web.bash | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/getLLA.sh b/scripts/getLLA.sh index 5155f1a..52a9d9e 100755 --- a/scripts/getLLA.sh +++ b/scripts/getLLA.sh @@ -15,16 +15,16 @@ if [ "$#" -ne 1 ]; then fi # Check that relevant command exist -if ! command -v identify > /dev/null; then - echo "Command identify from imagemagick not found. Exiting..." +if ! command -v magick > /dev/null; then + echo "Command magick from imagemagick not found. Exiting..." fi IMAGE_FILE="$1" -LAT=$(identify -format "%[EXIF:GPSLatitude]\n" "$IMAGE_FILE") -LAT_DIR=$(identify -format "%[EXIF:GPSLatitudeRef]\n" "$IMAGE_FILE") -LON=$(identify -format "%[EXIF:GPSLongitude]\n" "$IMAGE_FILE") -LON_DIR=$(identify -format "%[EXIF:GPSLongitudeRef]\n" "$IMAGE_FILE") -ALT=$(identify -format "%[EXIF:GPSAltitude]\n" "$IMAGE_FILE") +LAT=$(magick identify -format "%[EXIF:GPSLatitude]\n" "$IMAGE_FILE") +LAT_DIR=$(magick identify -format "%[EXIF:GPSLatitudeRef]\n" "$IMAGE_FILE") +LON=$(magick identify -format "%[EXIF:GPSLongitude]\n" "$IMAGE_FILE") +LON_DIR=$(magick identify -format "%[EXIF:GPSLongitudeRef]\n" "$IMAGE_FILE") +ALT=$(magick identify -format "%[EXIF:GPSAltitude]\n" "$IMAGE_FILE") DegreesToDecimal() { L0=$(echo "$1" | cut -d "," -f 1) diff --git a/scripts/jpg4web.bash b/scripts/jpg4web.bash index d04c76c..a0703b8 100755 --- a/scripts/jpg4web.bash +++ b/scripts/jpg4web.bash @@ -24,7 +24,7 @@ if [[ "$1" != *.jpg ]]; then fi # Check that relevant commands exist -if ! command -v mogrify > /dev/null; then +if ! command -v magick > /dev/null; then echo "Command magick not found. Exiting..." fi if ! command -v jpegoptim > /dev/null; then @@ -32,6 +32,6 @@ if ! command -v jpegoptim > /dev/null; then fi cp "$1" "$1.bak" -mogrify -resize "$WIDTH" "$1" +magick mogrify -resize "$WIDTH" "$1" jpegoptim "$1"