Is it possible to add some code that will auto orientate images that are uploaded with an exif orientation tag embedded,
In particular Ipad images,
The code (and explanation) below was created to overcome the problem of orientation tags not being recognised,
When the new update came out from Apple for iOS6 it provided the ability for iPad, iPod, and iPhones to be able to upload files from the device through Safari. Obviously this will open up an array of implementations where at one point it was just not possible.
The issue comes when a photo is uploaded it will be dependent on the location of the "button" when the photo was taken. Imagine if you will that you have your iPhone turned with the button at the top and you take a photo. The photo when uploaded to your server might be "upside down".
The following code will ensure that all uploaded photos will be oriented correctly upon upload:
$image = imagecreatefromstring(file_get_contents($_FILES['image_upload']['tmp_name']));
$exif = exif_read_data($_FILES['image_upload']['tmp_name']);
$image = imagerotate($image,90,0);
$image = imagerotate($image,180,0);
I have no idea if this could be implemented, but it would be very helpful if it could,