auto-rotated images come out wrong only on iphone and ipad
|
aligature
Joined: 2008-10-23
Posts: 5 |
Posted: Thu, 2010-08-12 13:49
|
|
I'm having an issue with how my rotated images appear when viewing from any iPhone or iPad. My EXIF based auto-rotate is enabled. When I view rotated pictures from my iDevices the generated thumbnail looks fine. Then when I view the basic resized and full images, the aspect ratio is correct, but the actual image is not rotated correctly and is stretched to fit the new dimensions. It seems like it's probably some interaction with the EXIF data, rotation, Mobile Safari being tricky and the img dimensions. Can anyone reproduce it on their side? Any workarounds? Here is an example from my gallery:
|
|

Posts: 16503
Apple probably thinks it's doing you a favor....
The only workaround I know of is to not have Gallery do the rotation. Rotate before hand, save it and upload.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 5
Actually, I was able to get things resolved pretty easily. I'm not quite sure why it works, but I'm just happy that the pictures show up correctly now. For anyone else having the issue, here's what I did. I'm running on Linux, so your mileage may vary.
1) Go to my gallery data directory with a command line. Then move to the albums directory.
2) Make sure I have the exiv2 utility installed.
2) Find all jpg files and run this exiv2 command script which resets the exif orientation info.
find . -iname '*JPG' -print0 | xargs -0 -n1 sudo exiv2 -v -m ~/exivcmd -k modify
---- exifcmd file ----
set Exif.Image.Orientation 1
set Exif.Thumbnail.Orientation 1
---- exifcmd file ----
3) Use a browser to get to my gallery maintenance page. Something like www.mysite.com/gallery/lib/support/index.php. The password is in your config.php file.
4) Click on Cache Maintenance.
5) Select Cached HTML pages, Albums and Photo Data, and Thumbnails and Resizes.
Voila, all of my pictures show up correctly on my desktop, iPhone and iPad.