Announcement

#1 2013-05-04 13:36:42

Kaare
Translation Team
Odense, Denmark
2012-09-17
11

Automatic rotation of images is causing trouble

I'm in the process of moving from Gallery2 to Piwigo, with only one major issue remaining before it can go live:  Automatic rotation of relevant images to an up-right position doesn't work with the images from my Canon EOS 7D camera.  I have installed and activated the rotateImage plugin.

My first thought was that images aren't automatically rotated, if they're synchronized into the gallery via the "galleries" directory, but if I go to a specific image and try to rotate it with the auto setting, it isn't rotated either.  However, if I manually select the wanted rotation on the Rotate tab, the image is rotated correctly (while, very confusingly, the thumbnail on the Rotate tab stays un-rotated).  I also tried to upload such an image from the browser, but still no automatic rotation.

Then I went to the command line and ran the "convert" utility using its auto-orient parameter.  That didn't work either, so I guess it's somehow releated to how my camera saves its Exif information or how "convert" interprets it.  To my surprise, opening such an image diretly in ImageMagick, does display it automatically rotated.  The orientation tag in the Exif information contains "8" (left-bottom).  I by the way also tried the "jhead" utility (which uses "jpegtran"), but it also didn't rotate automatically.

Back when I added the same images to Gallery2 (with ImageMagick being the preferred toolkit), I experienced no such issues, likely because Gallery2 either detects the potential problem or doesn't rely on the automatic feature alone or at all.

I don't want to rotate all of these problematic images manually via Piwigo, nor do I want to fix them locally and re-transfer to the server, as there is quite a lot of them spread across many albums.  I'm half-tempted to figure out what Gallery2 does to such images, and hack Piwigo to do the same thing in a similar fashion.  Also, I can't believe I'm the only one with this problem.

Any other ideas how to proceed?

Update: I proceed with two other galleries on the same server, and in none of those did the above mentioned auto-rotation problem crop up, so I guess to problem must somehow be related to the theme (Stripped, which meanwhile was updated) or my install.  Will try to start from scratch and see if the problem then goes away.

Update 2: I started over from scratch with the troublesome gallery, but that didn't make the problem go away.  I.e. not related to the theme after all.  I ended up rotating all of the affected images with the Batch Manager (putting albums into the caddie and manually selecting pictures for rotation).  However, the auto-rotation is in fact half-working (didn't notice before), since when an album page is generated, thumbnails in need of rotating are displayed in containers with the correct dimensions (but with the images themselves stretched/compressed to fit the container). When I reload such a page, the container is changed back the to form fitting the un-rotated picture.  Anyway, not a fun nor a good long-term solution to use Batch Manager, so I still hope someone can come up with a better solution for my future images.

Last edited by Kaare (2013-05-13 19:36:20)

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact