JPEG Orientation

Has anyone else had issues with JPEG orientation on Windows?
I have a JPEG that some Android app set the Orientation flag to 0, so Xojo 2016r3 on Windows gets mad and throws an error:

jpgOrientation >= 1 && jpgOrientation <= 8

Is there a workaround or preventative measures I can take in Xojo?
I cannot use anything newer than 16.3 because Direct2D does not allow custom fonts, and that’s a requirement of the client.

You can use MBS JPEG Plugin to load them.
And save again with different orientation.

Is there anything I can do plugins or otherwise that would work as a preventative measure?
The problem happens with Picture.Open on a JPEG with an invalid Orientation tag.

Looks like OpenAsJPEGMBS(allowdamaged as Boolean) is working perfectly.
Thanks, Christian!

Welcome. Other possibilities include CGImageMBS and NSImageMBS classes. And of course GMImageMBS class.