Snippet to rotate image in a Web Viewer

Discussion created by JStars on Oct 21, 2012
Latest reply on Oct 23, 2012 by beverly

[Sorry if you get this twice. I think I posted to the wrong forum earlier.


I'm trying to figure out the code I can add to a data URL in a Web Viewer to rotate images. I'm sure there's a simple short line—something like...


style="image-orientation: 90deg"


... but of course that doesn't seem to work. If you know what it should be, would you please add it to the following code...



"data:text/html,<img src="" & PHO::File Path & "" width="" & "100%" & "" />"


I ask that because messing up a single character will cause it to fail and debugging these WVs can be a nightmare. (I can hear you nodding.)


By the way, I'm looking for a way to do this without plug-ins that rotate the original image or lengthy CCS. When it's all done, I imagine using some kind of radio button or scripting to control text in a field which will be used as part of the text html, so I can rotate the WV image regardless of what orientation the picture was taken.


Thanks in advance.


Jonathan Stars

Data Design Pros, LLC