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
If the image width is smaller than the the height the picture is displayed sideways (rotated 90 deg). How can I get the image to be displayed with the correct rotation, that is the correct way up.
Comments
It's the same control just a different image
Mark - Are the images you are using in your screen shots particularly large? If not, can you send those along as well to support@srpcs.com? It seems odd (to me at least) that this has never been reported before. The SRP Picture control is used routinely in our apps. Also, have you tested these images with the OI bitmap control?
Yes I did test in the OI bitmap control and got the same result. When I reduced the size of the image (1/10th), the image displayed correctly. I reduced the size of the image using paint.net.
Did you want a copy of the reduced image? Just let me know.
The fact that OI and our control exhibit the same behavior is definitely relevant. We are not yet convinced that OI is the culprit but perhaps OI and our controls share the same root problem. We are researching this now to see what might be the issue. My current (yet somewhat unqualified) opinion is that this has more to do with properties within the image metadata than with size of the image. I suspect newer images are passing in data that older libraries (such as OI's and ours) might not know how to handle properly. This is why I'm interested in getting Mark's images or any other image that replicates the problem.
One final question...you said the rotation is 90 degrees. In Mark's screen shots and in my tests I am showing a -90 degrees (270 degrees, or counter-clockwise) rotation. Can you confirm that this what you are seeing?
Saving the image to be smaller had nothing to do with fixing the image. Instead, Paint.NET or SnagIt load the image auto-rotated and save the image in the new orientation minus the metadata.
Download and re-register SRPControls 4.0.2 RC4 and try it. The SRP Picture Control should now auto-rotate the JPEG according to it's Orientation metadata tag.
Cheers, M@
Chris - I'm afraid I don't see this behavior in my copy of OI, but I'm only testing the Picture control. Perhaps something else is crashing, but I don't have enough to go on at this point.
Try putting a hidden ole for srp picture on the mdi window.
Just something I found I had to do for srp popup use.
Send_Message(Ole_Ribbon$, "OLE.Init", SetupXml)
If I comment the above statement the ribbon is not displayed but the close button (the X in the top right hand corner) does not crash OI. Is there any other information that may help diagnose the problem.
Sorry, misled you. There is something else causing the problem because when I commented a large chunk of other ribbon statements and the above statement is not causing the problem.
*** Now embed the window to be displayed in the backstage page
NewWindow = Start_Window("PBC_ABOUT")
Handle = Get_Property(NewWindow, "HANDLE")
Send_Message(Ole_Ribbon$, "OLE.EmbedWindow", "PBC_BS_PAGE", Handle)
NewWindow = Start_Window("PBC_RIBBON_THEME")
Handle = Get_Property(NewWindow, "HANDLE")
Send_Message(Ole_Ribbon$, "OLE.EmbedWindow", "MDI2015_PAGE_BS_THEME", Handle)
Hope this helps.
* NewWindow = Start_Window("PBC_RIBBON_THEME")
* Handle = Get_Property(NewWindow, "HANDLE")
* Send_Message(Ole_Ribbon$, "OLE.EmbedWindow", "MDI2015_PAGE_BS_THEME", Handle)
*
Remember it is closing the MDI that causes the crash, not when the above statement is executed.
I am using the latest version of Windows 10 on a Microsoft Surface Book.
The ribbon theme form is a simple form with radio buttons setting various themes so I am somewhat surprised this is causing the problem. I will investigate further.
Ok - I've now got SRPcontrols v4.0.2.0 and rotated images are now showing the correct vertical orientation in SRP Picture control. However - I'm finding that images that explicitly have an Orientation tag of 'Horizontal (normal)' (value = 1), are showing flipped horizontally. Eg, the words are reversed in this image shown
Images with no Orientation tag are Ok.
How feasible is a patch for this?? :)
Cheers, M@
Download 4.0.3 RC1
Cheers, M@