Mercurial > geeqie.yaz
diff plugins/rotate/geeqie-rotate @ 1614:f6c8b76d41ca
Add .desktop files to restore lossless jpeg rotation via editors.
author | zas_ |
---|---|
date | Tue, 26 May 2009 19:41:22 +0000 |
parents | |
children | 34c71cbbbd26 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/rotate/geeqie-rotate Tue May 26 19:41:22 2009 +0000 @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a helper script that rotate jpeg files using jpegtran + +rotation=$1 +shift + +for file in "$@" ; do + tmp="$file".$$ + if jpegtran -rotate "$rotation" -copy all -outfile "$tmp" "$file"; then + mv -f "$tmp" "$file"; + else + rm -f "$tmp"; + fi +done