When I view a photograph taken with a digital camera the height is 4000 and the width is 6016, if I take the picture by turning the camera 90 Deg. the height is 6016 and the width is 4000. All is good, if I examine the properties of the image with file explorer(Windows 10) it looks correct for either picture. If I view the picture in Photoshop or picture viewer all looks correct as far as orientation. In my app I use exif to get the width and height it always shows width as 6016 and height as 4000. if I get an image via code:
dim orgimage as bitmap = new bitmap("C:/image/picture.jpg")
the width is always 6016 and the height is always 4000, if I change the 4000 to 3999 via Photoshop the image width and height are correct in my app. Is this a limitation of Visual Studios Visual Basic?
2
Answers
The reason for the difference is that the other applications are manually applying the correction for Exif.Image.Orientation (tag 274).
Just inspect this tag and rotate the bitmap accordingly.
If you check the orientation property it might help answering/helping your issue with width and height being same when reading photo from Camera output.
Please let us know your findings.
EXIF tags,
PropertyItem.Id 274