Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Picture Rotation

2»

Comments

  • Sorry, but loading 4.0.3 from link above did not fix the crashing problem. You asked for an RDK. What would you like to include in the rdk. Should we communicate via email instead of this form until this issue gets resolved.
  • Generally, when asking for an RDK, I am looking for a complete replication of the problem. So, no dependencies on application specific entities. If that is difficult, then it's sometimes easier to just ship us your copy of OI with steps to reproduce. We destroy the copy once we are done with it.

    I need more JPGs with the various orientation flags. Matt, can you email me some?
  • Got the orientation fixed for real this time. Found a resource online with samples for all 8 orientations. Turns out my internal library considers a 90 degree clockwise rotation to be "-90". So, all my rotations were going the wrong way. I didn't catch it because of the previous error. At any rate, this one should set everything straight.

    Download 4.0.3 RC2
  • Great - thanks! That fixes all my cases. You can sleep easy ;).

    Cheers, M@
  • Just been going through these upgrades as per my ribbon control thread.
    4.0.2 took pictures that were previously correct and rotated them 90 degrees counter clockwise.
    Upgraded to the 4.0.3 link above and those same pictures now show rotated 90 degrees clockwise.

  • Mark. The image you sent is rotating correctly. This is confirmed by the fact that it rotates the same way in Chrome and Windows Explorer. I did confirm that it has orientation 6, but the original picture is upright. Thus, the upright picture is rotates 90 degrees. This picture has an incorrect orientation. The orientation should be 1, not 6.
  • Chris. I was able to recreate the crash in your system. Try 4.0.3 RC3 and see if it goes away.
  • Thanks. Downloading 4.0.3 RC3 (as above) fixed the crashing problem.
  • Kevin are you saying there's something wrong with the picture itself because I have many examples of the same thing including the one at the beginning of this thread where the old picture control was getting it right?
  • Mark. I do think it's the image itself. Feel free to email me more images, and I'll gladly verify. A simple test is to see whether or not our control is displaying the image the same way as Chrome or Windows Explorer displays the image. If so, then the SRP Picture Control is handling the image correctly. Notice how in the screenshot you posted earlier, the old SRP Picture Control was incorrectly showing the image upright, while Windows Explorer was honoring the Orientation flag. It was just a happy accident that my technically incorrect handling of the image made it look visually correct.
  • Ok, I could send you more but I won't. Yes the picture control displays the pictures the same way as Windows Explorer so I guess that's the answer moving forward. I will go through and rotate the hundreds of pictures in windows explorer so they look the way they're supposed to. I hazard a guess that the incorrectly rotated pictures may have been taken prior to the change in rules? They've always displayed correctly before using the bitmap control. I am progressively moving bitmap controls out and picture controls in so from a user perspective it's going to look like an application error unless I rotate the pictures before rolling out the picture control.

    Admittedly not hard to do, just confusing that it's necessary.

    FWIW, I was rotating the pictures in explorer and then testing the bitmap and picture controls side by side. As you said, the picture control shows them with the same rotation as explorer, however the bitmap controls always showed them the right way up. So it seems that OI's technically incorrect handling handles better than the technically correct method. Don't know how but the bitmap control seems to know we don't take pictures of people standing on their head. :)
  • Believe me, this is frustrating. There should never have been an orientation flag. Why a phone can't just save the image pre-rotated is beyond me.

    My theory is that, prior to Windows 7, someone manually rotated your images in Explorer via a right click, and Explorer obliged without changing or removing the Orientation flag.

    Check out this link for a command that might be able to strip the orientation flag out of your photos (in bulk) without rotating them. I haven't run it myself, but I'm passing it along in case it's useful.
  • I agree with you there, Kevin! It's just created inconsistencies everywhere. For instance, Explorer and OIPI treat images differently. So if you're including images in OIPI reports, should you're application windows be consistent with Explorer, or OIPI?? (That's kinda why I was asking for a property setting earlier)

    The problem I have now is that previously, the user could see up front in a data entry window that they would need to rotate the image before printing it (using OIPI). Now they don't know until they run the report, and it looks like a bug in reporting (which I guess it is, sort of). Trouble is, it's usually too late by then.
  • edited September 2016
    I will go through and rotate the hundreds of pictures in windows explorer so they look the way they're supposed to.
    I think the phrase "the way they're supposed to" should be qualified. What you really mean is "the way a human observer expects them to look". Explorer, Chrome, and now the SRP Picture control displays them "the way they're supposed to" in the most technically accurate sense.
    I hazard a guess that the incorrectly rotated pictures may have been taken prior to the change in rules? They've always displayed correctly before using the bitmap control.
    Kevin's theory may be correct. However, I would suggest that the way some of these pictures displayed for you in the old SRP Picture (and the current BITMAP) control was a "happy accident". Interestingly enough, I ran into this very problem with our web/mobile applications around the same time this thread was picking up steam. Since our app takes pictures, we soon discovered that pictures taken while the device was held in landscape mode looked wrong to the human observer since the pictures were displayed as rotated. Fortunately, the information that Kevin researched for this thread helped our mobile app developer to resolve the matter fairly quickly.
    FWIW, I was rotating the pictures in explorer and then testing the bitmap and picture controls side by side. As you said, the picture control shows them with the same rotation as explorer, however the bitmap controls always showed them the right way up. So it seems that OI's technically incorrect handling handles better than the technically correct method. Don't know how but the bitmap control seems to know we don't take pictures of people standing on their head. :)

    Again, this is a happy accident with your pictures. My pictures needed this fix in order to display the images properly. Unfortunately, this is one of those regrettable scenarios where the fix can break things.
  • If it helps, Matt, you can examine the meta data for a JPG using the SRP Picture Control's GetMetaData method.
  • Sorry for being a bit slow on the uptake but I think I've caught up.
    Yes Kevin's theory is very plausible.
    Photos taken in landscape mode downloaded to XP computer. Photographer goes whoops and rotates them so they "look" right. Metadata doesn't change. Windows 7 or later comes along and the previously rotated photos now "look" wrong again. I think the key here is that no-one notices because the bitmap control displays them (as Don correctly points out) the way a human observer expects them to look.
    Am happy to accept that sometimes the fix can break things, I do it all the time, well on occasion anyway.
    Also happy to address it via windows as these photos are now potentially going out to the web and apps and so we will hit the same problem where no OI bitmap control is ever going to save us.
    I will go through and rotate the hundreds of pictures in windows explorer so they look the way they're supposed to.
    That wasn't meant the way it probably reads, rather just a perspective of how far the issue extends and I was just trying to get my head around exactly what's going on. I think I understand now except for still not understanding how the bitmap control gets it human observer right regardless of the rotation. Happy accident or not.

    In truth, it probably doesn't matter now that I understand the what, why and how to rectify. In theory I should only need rectify those photos that exist now and all photos moving forward should be correct?
  • In truth, it probably doesn't matter now that I understand the what, why and how to rectify. In theory I should only need rectify those photos that exist now and all photos moving forward should be correct?
    You are correct.
  • If it helps, Matt, you can examine the meta data for a JPG using the SRP Picture Control's GetMetaData method.
    Hmm - yeap, I suppose I could use that to give a visual cue beside the picture. Thanks!
  • Matt, I thought perhaps "fix" the image on-the-fly using the meta data via the command line tool that Kevin referenced. That way you wouldn't have to bother the user.
  • "fix" the image on-the-fly using the meta data via the command line tool that Kevin referenced. That way you wouldn't have to bother the user
    .

    Ah, I see! Yes, maybe. In some cases the images themselves aren't really 'ours' to fix (picky art museums!), but I could at least provide the option.
  • A further note on this. It appears this issue evolved progressively with each version of Windows rather than a was right, now isn't type scenario.

    I've been asking a client to rotate their photos. They say, "we have". I look and say "Really?"
    They're using Windows7. I'm on Windows10. They rotated the ones that looked incorrect to them, however I see many more that are still sideways. In a handful of instances, they were unable to rotate at all because the rotate options were disabled. I had no problem doing so.
  • My guess is that the industry approach to this did not evolve but perhaps Windows support did.
Sign In or Register to comment.