diff options
author | Patrick Simianer <p@simianer.de> | 2016-02-23 20:01:49 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-02-23 20:01:49 +0100 |
commit | 6ac1f2d2ba036fcc5d0b841b42560e9e8b545004 (patch) | |
tree | ffe97c97a9dc78142a581fc6d62869b5a7413be0 /jpegrotate | |
parent | 504a4e7b173cd6174b18d86209b7d33b28b768a0 (diff) |
jpegrotate
Diffstat (limited to 'jpegrotate')
-rw-r--r-- | jpegrotate | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jpegrotate b/jpegrotate new file mode 100644 index 0000000..ee7c3a8 --- /dev/null +++ b/jpegrotate @@ -0,0 +1,10 @@ +#!/bin/sh +# src http://www.zmatt.net/files/jpegrotate + +for file in $* +do + echo $file + rotate=`jhead $file |grep '^Orientation : rotate [0-9]\+$' | sed 's/^Orientation : /-/'`; + jpegtran $rotate -optimize -copy all $file >$file.tmp && mv $file.tmp $file +done + |