Portrait image orientation in Mac OS X, and how to fix it

This took me quite a while to google around and find this, so maybe it will help someone else out.

Any time I take a picture with my digital camera and transfer it to my Mac, every app within OSX is reading the EXIF orientation information and automatically orientating portrait-style pictures.  What this means is that when you turned your camera sideways to take a picture, OSX knows that and shows the picture to you in portrait mode, so it looks oriented correctly to you.  It does this in photoshop, preview, Finder, everything I’ve found at least.

The problem with this is that the picture *isn’t* actually oriented that way, so when you go to upload your pictures to the web, or put them on a disk, or email them to a friend, they’re going to be sideways.

If you don’t feel like writing a shell script to cycle through your images and read their EXIF data, then use transjpg or imagemagick to rotate the pictures and then wipe the exif orientation info, then just do the following.

Assuming you’re multi-selecting a batch of photos and then using Preview to scroll through and look at them, whenever you get to a portrait oriented picture (look at the thumbnail), go to

Tools -> Rotate Right.

Then go to Tools -> Rotate Left.

Its confusing, I know.  You’ll start with the picture looking correct to you, then you need to rotate it one direction and then rotate it back, to the way it was.  Then close Preview, and it will ask you if you want to save the images.  Say yes.  What this actually did was do an image transformation to rotate the data itself, then wipe the EXIF orientation info, but you’d never know that just by looking at it.

But, once you upload the image anywhere it will always be oriented correctly.

2 Comments »

  1. Alex Josef Said,

    November 20, 2009 @ 4:31 pm

    I’m also a bit puzzled about how to find out the ‘real’ dimension of an image in Mac OS X. Any idea how to find this out?

    For rotating them there’s an easy solution given you’re comfortable with the shell: get the jhead application (e.g. via macports) and use the following command:

    jhead -autorot *.JPG

    This will losslessly rotate all *.JPG images to their real dimension and adjust the EXIF orientation tag.

    Regards,
    Alex

  2. brian Said,

    November 20, 2009 @ 4:44 pm

    Ah thats even better. Thanks for the tip!

RSS feed for comments on this post

Leave a Comment