Have you ever loaded an image into say an Access Image control, or ‘legacy’ Web Browser control, only to have the image display flipped and/or rotated like:

when if you open it in most image software, preview it in explorer, open it in most modern day web browsers it displays just fine like:

and wondered what was going on exactly.
This happens because of something called the Exif Orientation tag, which is a piece of metadata stored inside many JPEG images by cameras.
Basically, when you take a photo, your camera records how you were holding the device (upright, sideways, upside down, etc.) and saves this information in the Exif Orientation tag (this is hidden information that is stored with the image). Instead of actually rotating the pixels in the image file, the camera just notes the orientation in the metadata. Some programs, like Windows Explorer, read this tag and automatically display the image in the correct orientation. Other programs might ignore the Exif Orientation tag and show the image as it is physically stored, which can result in the image appearing sideways or upside down
Continue reading →