Standard application to automatically rotate pictures based on EXIF

Windows 7 has PowerShell installed by default, which can be used to script image editing thru either WIA (Windows Image Aquisition) or the .Net system drawing object. Here's a quick powershell script using the .Net method to rotate all the jpg's found in the current directory by 90 degrees clockwise.

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
dir *.jpg |
ForEach-Object {
  $image = [System.Drawing.image]::FromFile( $_ )
  $image.rotateflip("Rotate90FlipNone")
  $image.save($_)
}

Rotation is limited by 90 degree increments, including image flipping orientation.


jhead + jpegtrans

Use jhead (which requires jpegtran for the auto-rotation feature).

From the windows shell,

jhead.exe -autorot image.JPG

For a batch of pictures in a directory, use shell globbing, e.g.

jhead.exe -autorot pics\*.JPG`

jhead will not modify files that do not need rotation.


Additionally

Make sure jheadtran.exe is in the environment PATH, e.g. PATH=%PATH%;C:\Path\to\jpegtran.

I suggest the -ft flag to "Set file modification time to Exif time".


Go to directory where is all your photos. Change to Details View. Right click on one column and Click More. Tick appropriate EXIF detail and OK. Now filter all files based on this EXIF detail and finally select all photos, right mouse to rotate either clockwise or counterclockwise.