1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Image rotation coding

Discussion in 'Off Topic' started by Smooth, Nov 12, 2011.

  1. Smooth

    Smooth Active Member

    Hey all,

    Got a weird non xenforo problem. A member just posted a pic to our site, and it displayed as landscape. It appears as portrait on his iPhone as well as after he emailed the original to me (in my email client and explorer. After opening it in exif reader, you can see the original is infact still showing as landscape?! Can anyone assist in helping me troubleshoot? I think it is to do with the exif data being used to change the orientation and this is what is being read by OS's but can't be read by Xenforo?

    Screenshot of exif reader looking at original:
    Screen Shot 2011-11-12 at 17.33.24.png

    Screenshot of OSX opening it, with no edits or anything:

    Screen Shot 2011-11-12 at 17.37.32.png

    Thank you ever so much for any assistance you can offer this Noob non coder :D
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Certain software can auto-rotate images - my PC does it with images taken with my Canon.

    XenForo doesn't read EXIF data - it just resizes images based on the settings in the ACP.

    Are you sure the iPhone isn't supposed to display landscape images like that and you just need to turn it 90 degrees to see it in the correct format?
  3. Smooth

    Smooth Active Member

    Thanks Brogan - I knew Xen does nothing but the resize so know its not a Xen bug.

    The iphone is displaying the image as shot, I just cant work out why there is a discrepancy between what the exif shows, and the original if no editing has been done to it.

    Only thing I can think of is that it is a quirk with the gyro when shooting?
  4. Smooth

    Smooth Active Member

    Aha. Found the answer - will post incase anyone else runs into this.

    The iPod Touch (and iPhone 4/s front cam) record all images as shot, then add an exif tag with orientation number. This is then interpreted by the IOS, OSx and xp (and many more). Apparently they do this so as to not suffer loss of quality when saving? Obviously as Brogan says, Xen pays no attention to the exif and so shows the file in its original landscape format.

    Hope that helps someone. :)

Share This Page