Link to home
Start Free TrialLog in
Avatar of clearchannel
clearchannel

asked on

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???
Avatar of openshac
openshac

Avatar of clearchannel

ASKER

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.
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.
As you just linked to other EE posts, Can you point out where then as I did not see any reference.
ASKER CERTIFIED SOLUTION
Avatar of openshac
openshac

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>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 ;-)