- return 0
- else
- exit 1
- fi
- ;;
-
- tif|tiff|png)
- if [ -n "$gq_orientation" ] ; then
- exiv2 -M "set Exif.Image.Orientation $gq_orientation" "$1"
-# shellcheck disable=2181
- [ $? != 0 ] && exit 1
- fi
- if mogrify -auto-orient "$1" ; then
- # mogrify ignores xmp, set it manually
- exiv2 -M "set Xmp.tiff.Orientation 1" "$1"
-# shellcheck disable=2181
- [ $? != 0 ] && exit 1
- #http://dev.exiv2.org/issues/639
- if [ -n "$gq_orientation" ] ; then
- exiv2 -M "set Xmp.tiff.Orientation 1" \
- -M "set Exif.Image.Orientation 1" "$gq_metadata"
-# shellcheck disable=2181
+ if gq_exiftran -aip "$1"
+ then
+ # exiftran ignores xmp, set it manually
+ gq_exiv2 -M "set Xmp.tiff.Orientation 1" "$1"
+ # shellcheck disable=2181