Skip to content

Commit

Permalink
Fix #1592: Won't try using exiv2
Browse files Browse the repository at this point in the history
#1592

exiftool is no longer used in the image crop script - exiv2 replaces the
function exiftool performed.
  • Loading branch information
caclark committed Jan 30, 2025
1 parent 926cee7 commit d827723
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/image-crop/geeqie-image-crop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## @file
## @brief Crop image
##
## Requires ImageMagick and exiftool
## Requires ImageMagick and exiv2
## Crops the image to the size set by the Draw Rectangle menu item
##

Expand All @@ -21,10 +21,10 @@ process_raw ()
src_filename=$(ls "$tmpdir/")
filename="${src_filename%.*}"
extension="${src_filename##*.}"
rotation=$(exiftool -Orientation -n "$1" | cut -d':' -f2 | xargs)
rotation=$(exiv2 -g Exif.Image.Orientation -Pv "$1")
convert "$tmpdir/$src_filename" -crop "$2" "$tmpdir/$filename-crop.$extension"

exiftool -Orientation="$rotation" -n "$tmpdir/$filename-crop.$extension"
exiv2 -M"set Exif.Image.Orientation $rotation" "$tmpdir/$filename-crop.$extension"

rm "$tmpdir/$src_filename"

Expand Down Expand Up @@ -58,7 +58,7 @@ export title="Geeqie crop image"

if [ -x "$(command -v convert)" ]
then
if [ -x "$(command -v exiftool)" ]
if [ -x "$(command -v exiv2)" ]
then

coords=$(geeqie --get-rectangle)
Expand Down Expand Up @@ -94,7 +94,7 @@ then
fi
fi
else
zenity --info --title="$title" --text="Crop image\n\nexiftool is not installed" --title="$title" --window-icon="$window_icon" 2> /dev/null
zenity --info --title="$title" --text="Crop image\n\nexiv2 is not installed" --title="$title" --window-icon="$window_icon" 2> /dev/null
exit 0
fi
else
Expand Down

0 comments on commit d827723

Please sign in to comment.