How to Batch Rotate Multiple Images in Multiple Directories
May 29, 2007 2:09 PM   Subscribe

How do I rotate batches of images based on a certain criteria?

OK, I'm working for a legal support firm on an electronic discovery project. One part of the project is making sure all of the 10,000 have a portrait (i.e. not landscape) orientation. The files are scattered across multiple directories.

Is there a program or process that would allow me to rotate images if the width of the document was greater than its length?

I have heard that ImageMagick could do this but I don't know how to do this task from the command line. If someone recommends this program, could you provide me with the appropriate code to do this task?

In the past, we've hunted and rotated this images manually but I would like to avoid that!
posted by jmprice to Technology (1 answer total)
 
Best answer: From the ImageMagick man page:

-rotate degrees{< }{>}


apply Paeth image rotation to the image.


Use > to rotate the image only if its width exceeds the height. < rotates the image if its width is less than the height. for example, if you specify -rotate -90>" and the image size is 480x640, the image is not rotated. However, if the image is 640x480, it is rotated by -90 degrees. If you use > or < , enclose it in quotation marks to prevent it from being misinterpreted as a file redirection./i>

posted by kcm at 2:17 PM on May 29, 2007


« Older What BDSM clubs can I find in New York City?   |   What to do for a used car? Newer »
This thread is closed to new comments.