Image Control - rotate using exif orientation value

My inventory application contains image controls that populate from cell references to locally stored image files. Unfortunately, LO doesn’t seem to use the exif data to rotate the image properly. Are there any work arounds available to solve this. I have written python code to change the files duplicating them with the specified rotation. But, every time the user adds a picture, a separate program has to be run in order to revise the view.

On a side note, I tried using the SystemShellExecute to use the default system picture viewer, but after shelling out twice the dialog freezes. This happens on Windows 8.1 and XP. Windows 10 seems to work OK. Again unfortunately my users are on XP and 8.1.

Any thoughts on either of the above would be greatly appreciated.

Hello,

Please see answer by Regina in this post → Selecting a foreground image in a macro. It contains a sample document with code.

Hope this helps.

Thanks for the reply. This work around could offer a potential fix. Since I can see exif data in python is there any way to call the python script from basic in order to return the rotation variable?

Can the image control use the clipboard as a source vs URL?

My original preference was to use the shell option. Any thoughts on why the dialog freezes? After shelling out 2 times, I can close the picture views, but the only control that works on the dialog is the X (terminate). No other buttons or fields are reachable.

Thanks again.

oops, I should have looked further regarding a call to python. A search reveals a few options, so that question may be answered.

Glad you found the Python call. Has been posted a few times.

As for shell, only have Vista on an old slow system (used for emergency backup). Currently use various Linux systems and have had no problems with shell.