From 6ac1f2d2ba036fcc5d0b841b42560e9e8b545004 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 23 Feb 2016 20:01:49 +0100 Subject: jpegrotate --- jpegrotate | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 jpegrotate (limited to 'jpegrotate') 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 + -- cgit v1.2.3