I am building an application in HTML5 for iPad to upload a picture to a server. When I click an input file element like this:
<input id='fileup' type='file' accept='image/*' name='upf' onchange='abv();'/>
It gives the possibility to either take a picture from the device camera or to upload from existing ones. However, when taking a picture, the resulting image is rotated based on the orientation of the device at the moment the photo is taken. What I want to do is to figure out the orientation of the captured image and try to rotate it on the server-side.
Notice that I do not have access to any iOS tools or frameworks, since this application is totally web-based.
Then, is there any information regarding the orientation of the picture that I can either access on the client or on the server-side, such that I would be able to rotate the images into the proper position? I have heard of EXIF data, but I am unsure on how to access it, and if it would give me the required information.
I am using python on the server-side, but a solution in C/C++ would also be appreciated.
Thanks.