I have a JPEG image that was shot on an iphone. On my desktop PC (Windows Photo Viewer, Google Chrome, etc.) The orientation is incorrect.
I am working on an ASP.NET MVC 3 web application where I need to upload photos (plupload is currently used).
I have server code for image processing, including reading EXIF โโdata.
I tried reading the PropertyTagOrientation field in EXIF โโmetadata (using GDI - Image.PropertyItems ), but this field is missing.
So this is either some specific iphone metadata or some other metadata.
I used another tool, such as Aurigma Photo Uploader, and it reads metadata correctly and rotates the image. How it's done?
Does anyone know what other JPEG metadata may contain the information needed to know that it needs to be rotated, which is used by Aurigma?
Here is the code that I use to read EXIF โโdata:
var image = Image.FromStream(fileStream); foreach (var prop in image.PropertyItems) { if (prop.Id == 112 || prop.Id == 5029) {
Any ideas?
c # image-processing jpeg metadata gdi
RPM1984 Jun 03 '11 at 1:15 2011-06-03 01:15
source share