I'm not 100% sure of this explanation, but for what it's worth ...
The idea occurred to me that it is possible that your computer is what's doing the "smart" stuff, taking a file that is really right side up and turning it upside down because of some setting in the file. If that is so then if you take a file that your computer thinks should be displayed upside down, it just might really be right side up. So … the file that your computer shows as upside down is really just fine the way it is for use in other places and it is your computer that's the bad guy here.
If my wild guess is right then there is probably a setting somewhere in your graphic editing program or maybe in your operating system that you can make to force the computer to stop trying to do your thinking for you, but I have no idea what it is or where it could be.
One thing you might try, just to see what happens … if you have a different graphic viewing or editing program, take an image that displays upside down in the one program and open it in a different program and see what it looks like.
Bottom line is that I'm clueless … just instinctively found an empirical solution on a lucky guess.