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???
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???
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.
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.
If I'm not mistaken the ProprtyItem you're interested in PropertyItem 274 - the Orientation tag.
ASKER
As you just linked to other EE posts, Can you point out where then as I did not see any reference.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>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 ;-)
The PropertyItems collection that is (not the articles)
Didn't mean to sound condescending ;-)
http://www.eggheadcafe.com/articles/20030706.asp
https://www.experts-exchange.com/questions/23526150/C-NET-Read-EXIF-data-from-Jpg-file.html