I made a photo with my Samsung phone and:
The orientation is good when displayed on the phone
The orientation is good when displayed in Picasa (this means the JPG files contains the right orientation metadata!)
- The orientation is wrong when displayed in Windows 7 Explorer thumbnail:
- The orientation is wrong when displayed in Windows 7 Image viewer:
One solution could be to "forget about Windows 7's built-in image viewer", and use another better image viewer, but I don't want this.
I would like to permanently rewrite the JPG files (and overwrite them) with the new good orientation, in bulk for hundreds of JPG files, i.e. like if I clicked manually hundreds of times on these buttons when viewing the images one after another:
but automatically, with a script.
How to do this?
Note: I know it might not be lossless, but still I would like a permanent rotation so that the default Windows 7 image viewer see them with the good orientation.
Note 2: here is the source file, available for download.



