Announcement

Collapse
No announcement yet.

EXIF orientation tag confusion; unpredictable auto-rotate behavior

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    EXIF orientation tag confusion; unpredictable auto-rotate behavior

    I am having problems with websites such as Facebook and Wordpress auto-rotating my images in a seemingly random manner when I upload them and suspect the problem has to do with my EXIF tags. Does that sound right?

    I'm overwhelmed by the all the orientation tag options in Irfanview. Can someone set me straight?

    For example all these seem like they could be involved. Wouldn't you need all these to be properly set in order for the websites to auto-rotate properly? - or rather, to not auto-rotate because I already have everything rotated the way I want.

    Options > Properties > JPG/PCD/GIF > JPEG-load > Auto-rotate image according to EXIF data if available
    JPEG Lossless transformation > Auto rotate according to EXIF orientation if available
    JPEG Lossless transformation > Write JFIF marker
    JPEG Lossless transformation > Keep all APP markers
    Save > Keep original EXIF (IPTC / JPG Comment / XMP) data
    Save > Reset EXIF orientation tag

    I just now discovered the first one. It was unchecked and could have been so for a month or year or 10 years. My EXIF rotation tags on many hundreds of photos may be a total mess.

    I am a 'power user' used to figuring out advanced things on my own but auto-rotation by websites seems like a bewildering interaction of the camera's auto-orientation behavior, Irfanview's complex EXIF tag settings, and the websites.

    Cameras:

    Canon Powershot S100
    LG Nexus 4 phone

    #2
    Originally posted by everything View Post
    I'm overwhelmed by the all the orientation tag options in Irfanview. Can someone set me straight?
    Join the club!
    I have been requesting changes to how auto-rotation works for years but every attempt always ends in confusion.
    Try this one for starters if you really want to get involved in this subject.

    Comment


      #3
      Originally posted by Mij View Post
      Try this one for starters if you really want to get involved in this subject.
      Well my preference would be to not really get involved and just find a guide that says "Use these settings A B C D" to tame the rotation mess ;^)

      I'm wading through that thread now and it raises another question: Why does JPEG lossless rotation exist at all when you could just set the EXIF tag and then programs will read it and display the photos properly? It makes no difference to me if the pixels in the original file haven't actually been moved around since everything would behave *as if* they had been.

      Or -

      if not everything out there uses EXIF tags then IV should offer way to look at all your photos' rotation tags, then do a lossless rotation to make the orientation match that, then change the EXIF tag to 'unrotated'.

      Comment


        #4
        JPEG lossless rotation works in a different way to normal rotation in Irfanview. For normal rotation you open the file and decompress the JPEG image data into a bitmap which is what is shown on screen. Any edit operation, including a rotation if requested, is done on the bitmap. In order to keep the changes you then need to save the file again, so the bitmap, as you now see it, is compressed back into a JPEG format and the new version of the file is saved. Because there is some loss of picture quality when you decompress and then re-compress JPEG files some people avoid doing it, although in practice if you are using reasonable quality settings for saving (say 70 or more) you would be hard put to see any quality loss.
        Lossless rotation does not decompress the JPEG data. The file is opened but the image data is rotated in the compressed state and re-saved. So no loss of quality but any edits you may have done to the bitmap image are ignored. It is always the original image that is rotated and saved. If you use the lossless Auto rotate (according to EXIF) option, the EXIF orientation tag is always automatically reset to Top Left whatever the settings are in the JPEG Save options.

        Your question is competely relevant. Were it my program I would not offer JPEG lossless rotation in the normal browser window. It just confuses people to have the feature there IMHO.
        IV does have an option to do lossless rotations on "all photos" though. It is in the Thumbnail view window (File menu). You can open a folder of images there (with all the subfolders too, if that is what you want - Options menu) and then do the lossless operation on as many of them as you choose to select, all together as a batch. That is a powerful feature and the right place to have it too.

        Comment


          #5
          I have an old little camera that isn't able to write orientation tag; I rarely use it now, but have thousands of old photos, many of them in "portrait" format. For some time I have been using lossless rotation, but don't do that any more. All modern image viewers can be set to rotate images according to EXIF tag, so I only have to set the tag, when necessary. I use ExifToolGUI for that, a little metadata viewer with decent editing capabilities. (ExifTool is a reliable command-line utility, that can do almost anything, used properly. For me, the simple GUI is usually enough.)

          Like in IV, ExifToolGUI can be set to rotate images in preview (or not), and editing tags is quick and easy, so I find it a fine tool to track down and repair images with wrong or missing orientation tags. You can edit multiple images, as long as they are in same directory. Since I often fiddle with metadata, I have set it as one of IrfanView's external editors.

          When a part of "total mess" are inadequate EXIF thumbnails, WildBit Viewer can be useful, since it shows the actual thumbnail in file info, when present. (Don't download the latest beta version for this, the feature is missing at the moment. Version 6.0 will do the job.)

          ExifToolGUI
          IrfanView 4.62 64-bit

          Comment


            #6
            Originally posted by Mij View Post
            JPEG lossless rotation works in a different way to normal rotation in Irfanview.
            I really appreciate your time and thoroughness, but I already have an advanced-level understanding of what lossless rotation is and how it differs from lossy rotation.

            I have been asking poweruser-level questions about different aspects of EXIF rotation tags at various forums and all I am getting is people telling me what lossless rotation is, as though I didn't know. That's a beginner-level question far more basic than the ones I'm asking and I don't know why so many people keep doing this.

            After about 20 hours of research my 'rotation mess' is narrowing down to two problems:

            1) Windows thumbnail orientation is inconsistent and unpredictable. I have done controlled experiments proving this. You can have two photos with the same orientation, same EXIF orientation tag, do the same lossless rotation procedure - and one might have a correct thumbnail while the other is 90 degrees off.

            I think WildBit Viewer and ExifToolGUI solve this, which would be an enormous help. (See my next post.)

            2) Websites where you upload images have outrageously inconsistent and erratic auto-rotation behavior that the user cannot control. A given website might follow orientation tags on one page but ignore them on another. Full discussion here. The best you can do, given this, is make sure your thumbnails are displaying correctly (with one of the above programs) and check that your orientation tags are 'clean' with IV or one of those.

            Comment


              #7
              Originally posted by Jacal View Post
              ExifToolGUI for that, a little metadata viewer with decent editing capabilities.

              When a part of "total mess" are inadequate EXIF thumbnails, WildBit Viewer can be useful, since it shows the actual thumbnail in file info, when present.[/URL]
              YES! *This* is what I need - I think. Thank you so much! If could get consistent thumbnail orientation that would solve at least half my problems because then I could look in a folder and see all my photos' EXIF orientation tags listed without going through every photo one by one.

              Also it is a huge huge help that Wildbit lets you display columns for orientation, camera model and program name (which is the only way to know the name of the Android camera app that was used)


              There are several interacting issues:

              1) IV, Wildbit and Windows read image orientation differently when generating thumbnails. See screengrab. All three are making different choices on different images. The behavior is complex and I will be running experiments to try to sort it out. (In the sample, only Windows got all 4 thumbnails right - but that's rarely the case! Usually IV is far better - trust me on this.)



              I have already done an experiment on Windows which proved that its behavior is truly erratic and unpredictable. Sometimes the thumbnail orientation matches the 'virtual' orientation (i.e. EXIF orientation tag) and sometimes it matches the 'real' orientation (i.e. the actual pixels), and sometimes neither.

              2) My Canon camera and the two different camera apps on my Android phone all handle rotation differently. See table.




              3) If you forget (like I sometimes do) whether IV's "Auto-rotate image according to EXIF info" setting (under Properties > JPG/PCD/GIF) is checked or not, orientation can get severely screwed up.

              4) The enormous problem I mentioned in my previous post, that websites aren't even internally consistent about how they deal with orientation of uploaded photos much less across different websites.
              Last edited by everything; 11.06.2014, 03:14 PM. Reason: clarifications

              Comment


                #8
                Do post the results of your experiments, please.

                There are a few things about Irfanview which you may not have discovered that might be helpful.

                a) Thumbnail window. There is a setting in Thumbnail options dialog "Try to load EXIF thumbnails for JPG files" that gives you a choice of viewing the EXIF thumbnail from file or Thumbnails that are just a reduced version of what you see in the Viewer window

                b) Auto-rotate from EXIF orientation. When this option is set it is applied to all views - Images in Viewer window and Both Thumbnail types.

                c) From IV v4.35 the EXIF thumbnail is automatically updated to match the current image whenever the image is saved. Before that the EXIF thumbnail could not be updated.

                d) From IV v4.36 the EXIF thumbnail can also be updated after a lossless rotation by checking "Rebuild EXIF thumbnail" in the dialog

                e) You can display useful data in the Status line at the bottom of the Viewer window from the Viewing tab in Properties/Options. I think you need to enter codes $E274 $E272 and $E305 for what you are seeing in Wildbit viewer. Click on the Help button at the end of the Status bar text option for other codes.

                Comment


                  #9
                  Originally posted by Mij View Post
                  There are a few things about Irfanview which you may not have discovered that might be helpful...
                  Wow, I can't thank you enough! Each of these tips is enormously helpful. They may sound like minor details but for me they're important solutions. You and the other post-er are zeroing in on exactly what I need.


                  So do I understand correctly that I must use an advanced imagine handling/editing program (which could be IV, Wildbit or something else) in order to be certain I'm seeing accurate, updated thumbnails - and not Windows Explorer or other programs that use Windows' 'native' thumbnails? (So far, this is what my experience indicates.)

                  That will be a hassle because I do a lot of back-and-forth between managing photo and non-photo files (moving, copying, pasting, folder organization etc.). It'd be too bad if my file manager can't be relied on for accurate thumbnails -

                  but if so, at least now I'm aware of the situation.

                  Give me a few days to do the thumbnail experiments. I first want to get to know Wildbit and EXIFToolGUI.

                  Also, note that I just now edited my post above, to point out that in the sample only Windows got the thumbnails right, but most of the time it's the other way round!
                  Last edited by everything; 11.06.2014, 03:22 PM. Reason: clarification

                  Comment


                    #10
                    Originally posted by everything View Post
                    Give me a few days to do the thumbnail experiments. I first want to get to know Wildbit ...
                    If you are overwhelmed by the options in Irfanview I think it may be more than a few days before you are back

                    Comment

                    Working...
                    X