Advertisement
mosaid

Untitled

Nov 18th, 2019
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1.  from ~/.config/ranger/scope.sh
  2.         image/*)
  3.             local orientation
  4.             orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
  5.             # If orientation data is present and the image actually
  6.             # needs rotating ("1" means no rotation)...
  7.             if [[ -n "$orientation" && "$orientation" != 1 ]]; then
  8.                 # ...auto-rotate the image according to the EXIF data.
  9.                 convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
  10.             fi
  11.  
  12.             # `w3mimgdisplay` will be called for all images (unless overriden as above),
  13.             # but might fail for unsupported types.
  14.             exit 7;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement