Solved

Rotate jpg file based on EXIF data

Posted on 2008-10-27
6
773 Views
Last Modified: 2012-05-05
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???
0
Comment
Question by:clearchannel
  • 4
  • 2
6 Comments
 
LVL 6

Expert Comment

by:openshac
ID: 22811503
0
 

Author Comment

by:clearchannel
ID: 22865531
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
 
LVL 6

Expert Comment

by:openshac
ID: 22865821
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:clearchannel
ID: 22865887
As you just linked to other EE posts, Can you point out where then as I did not see any reference.
0
 
LVL 6

Accepted Solution

by:
openshac earned 500 total points
ID: 22866093
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
 
LVL 6

Expert Comment

by:openshac
ID: 22866137
>>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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question