Rotate jpg file based on EXIF data

I am not sure there is a solution for what I want to do but I thought I would ask anyways...

I have a .net application that gets xml from an external source with images.
I am loading the xml and images and displaying them, no image attributes are contained in the XML file.
Some images are lanscape and some portrait

Is there a way somehow how to use the EXIF data in the JPG to work out whether the shot should be displayed horizontally or vertically and rotate the image as neccassary???
clearchannelAsked:
Who is Participating?
 
openshacConnect With a Mentor Commented:
I think all the articles talk about using the PropertyItems so you just need to be able to read those first.
Then I think you're interested in PropertyItem 274 - the Orientation tag.
0
 
clearchannelAuthor Commented:
Those links don't really help with what I want to do. Sorry.
They relate to extractng the EXif data and lossless image support, neither refer to the image orientation etc.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
openshacCommented:
Both posts give details on how to get the PropertyItems from the EXIF data.
If I'm not mistaken the ProprtyItem you're interested in PropertyItem 274 - the Orientation tag.
0
 
clearchannelAuthor Commented:
As you just linked to other EE posts, Can you point out where then as I did not see any reference.
0
 
openshacCommented:
>>so you just need to be able to read those first

The PropertyItems collection that is (not the articles)

Didn't mean to sound condescending ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.