Saturday, September 24, 2011

How to Quickly Rotate Several Image Files from Upside Down to Rightside Up in OSX


Not exactly the PHP-related post I expected to write next... Many people, Mac users included, won't need this post. That's okay, because it isn't for you.  It's for Mac newbies, a description which I apply to myself.

I'm using an extended keyboard, with the numeric keypad and inverted-T arrow keys.  I'll have to look at a regular keyboard and see what the equivalent keystrokes would be.

Someone scanned 40-something pages of a document and emailed the resulting jpeg image files to me.  They were all upside down.  Here's what I did to get them right-side up, fairly quickly - though still a manual process - on the Mac under OSX.


  1. Open a Finder window showing all the files in a list view. Get into list view by clicking the second icon from the left immediately above the area in which the files appear.
  2. Select all of the image files by clicking on the file at the top of the list, pressing the shift key and, holding it down, press the down arrow key until all filenames are highlighted.
  3. Command-O to open all of them at once in the Preview application.
  4. Hold down the Command key with your right thumb.
  5. With your left hand, press the "R" key twice, to rotate the image right, until it is vertical. Do NOT release the Command key with your right thumb.
  6. Press the "S" key with your left hand to save the image.
  7. Release the command key under your right thumb, and press the down arrow key.
  8. Repeat steps 4 through 7 until you've finished with all the images.


If this happens to you a lot, you could record this process and play it on another set of files using the built-in Automator Application.  That's for another day, though.

If you find this useful, or if you have suggestions for improvements to this process, let me know.