#!/bin/bash # perfect lossless rotation of a jpeg image # $1 is input file # $2 is output file jpegtran -rotate 90 -copy all -perfect -optimize -progressive $1 > $2