More on Photo Rotation

Get community help here, post test messages, suggestions etc. I will also document here changes that take place such as maintenance and upgrades.

Moderators: Harold_V, Marty_Escarcega

Post Reply
User avatar
rmac
Posts: 787
Joined: Tue Jun 26, 2012 12:48 am
Location: Phoenix, Arizona

More on Photo Rotation

Post by rmac »

For the past week or so, I've been trying to figure out why pictures on this board sometimes show up sideways or upside down, and what we can do about it. This post summarizes what I've discovered.

THE PROBLEM

Some image files contain information (sometimes called "metadata" or "EXIF data"), part of which tells how the camera or phone was oriented when the image was captured. The idea is that if, say, the camera was held upside down when the image was taken, a program that wanted to display the image could be smart enough to invert it first. Whether or not any particular file contains this orientation information depends on the device that created the image in the first place, as well as any subsequent processing that the file might have undergone.

As it turns out, some programs do not handle the orientation information correctly and end up displaying the pictures sideways or inverted. As we all know, the phpBB software that runs this board is an example. If you visit the support forum for phpBB , you will find that this has been a problem for years. The folks there have tried many solutions and workarounds, but apparently none of them has been completely successful.

WHAT CAN WE DO?

Since a fix to phpBB is unlikely, the next best thing is to create images that work with the software as is. But what does that mean?

As near as I can tell, phpBB will handle an image file correctly in either one of these two cases:
  1. The orientation information in the file says that the camera was in its normal, right-side up position when the image was taken. For most cameras I'm familiar with, this would result in a landscape orientation, where the picture is wider than it is tall. I'm not sure about cell phones.
    --- OR---
  2. The orientation information is absent from the file altogether.
So again, what to do? Here are some suggestions, from easiest to most difficult:
  1. Get lucky. If you can rotate your camera or cell phone in various ways, upload the pictures to chaski and see that they always appear correctly, congratulations! You don't need to worry about any of this. I have one cell phone that happens to behave this way and another that doesn't. I guess I'm half lucky.
  2. Always hold your camera right side up. This probably means no portrait style photos (taller than they are wide), but it's an easy, practical, and probably foolproof solution if you're having problems.
  3. Fix your PC images before uploading. If you're working on a PC, this is very easy. I found quite by accident that all you have to do is open your pictures in Microsoft Paint (sometimes called MS Paint, it comes with Windows) and immediately save them back to the disk. MS Paint automatically rotates images into the correct orientation, and writes the rotated images back to disk with the orientation in the metadata set to Horizontal (normal).
  4. Fix your phone images before uploading. I don't know if there's a way to fix images directly on a cell phone or not. But if you can transfer them to a PC (via email or some file sharing setup like dropbox) then you can proceed as in #3, above.
  5. As a last resort, upload whatever you've got and I will put on my moderator's hat and fix any problems for you.
OTHER NOTES
  • For the geeks among us, this site will display the metadata, including orientation information if it is present, in files that you upload. You'll be surprised at all the info that's in there.
  • Since some programs handle the orientation information correctly and others don't, statements like "It looks okay on my PC!" don't make complete sense. On my computer for example, Thunderbird (an email client) does everything correctly and images consistently appear right-side up no matter what. But Paint Shop Pro 7 (an oldish paint program) has the same problems that the phpBB software does.
If any of this doesn't make sense, doesn't work, doesn't match what you're seeing, or if I've missed something, please let me know so I can fix it while everything is still fresh in my aging brain.

-- Russell Mac

Edit: 27 Sep 2022

User "bushav" reports another workaround to this problem. Here's what he has to say:
bushav wrote: My iPad orients the pictures correctly! Successful workaround and my picture gallery will still be oriented correctly on the iCloud. I'm taking the pictures with the iPad held horizontal.
Patio
Posts: 1369
Joined: Wed Oct 06, 2010 3:14 pm
Location: Centralia Wa

Re: More on Photo Rotation

Post by Patio »

Russ, thanks for info and the link!
Live for the moment!
Prepare for tomorrow!
Forgive the past!
User avatar
Greg_Lewis
Posts: 3014
Joined: Wed Jan 15, 2003 2:44 pm
Location: Fresno, CA

Re: More on Photo Rotation

Post by Greg_Lewis »

There is terrific piece of software out there for sorting, re-naming, and captioning photos called Photo Mechanic. Originally designed by a photojournalist, it's great for just about everything you'd want to do to a folder of photos other than editing an image itself, and it's blindingly fast. Its original intent was for those professionals who come back from, say, a sporting event with hundreds of photos that need to be viewed, sorted and organized quickly.

One of the features is that while you can rotate the view of the image, you can also rotate the jpg, which solves the problem above. The software has many features that can be customized for someone's particular need. I recommend it without reservation.
Greg Lewis, Prop.
Eyeball Engineering — Home of the dull toolbit.
Our motto: "That looks about right."
Celebrating 35 years of turning perfectly good metal into bits of useless scrap.
Post Reply