blob: ee7c3a83df166d0de4fc601c8254ac8648f65e60 (
plain)
1
2
3
4
5
6
7
8
9
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
|