Hi everyone,
background data: piwigo 2.2.2
activated automatic rotation in local/config/config.inc.php with $conf['upload_form_automatic_rotation'] = true;
verfiied that there is imagemagick installed (dpkg -l lists it, and "convert" works)
I cannot get automatic rotation working. I have tried uploading direct from the web site as well as the shotwell/piwigo connector (shotwell from latest git sources) and in all cases the photo ends up in the unturned orientation, although all of nautilus, shotwell, gthumb etc correctly see the exif orientation and display the image rotated.
Any suggestions?
Thanks
Norbert
Offline
Hi Norbert,
([Bugtracker] ticket 2335)
Have you tried to add photos directly via the Administration Console in your gallery?
He must know where the problem originates.
Offline
Yes, I tried both uploading via the admin console as well as via shotwell, both without success.
Offline
Hi norbusan/norbert,
1) to make sure ImageMagick is used on your Piwigo, open screen [Administration > Photos > Add > Configuration], do you have a section to manage high definition resize settings? If yes: you're using ImageMagick, if no: you're using GD.
By the way, the automatic rotation does not depend on ImageMagick. You can also have rotation with GD. It depends from other prerequisites.
2) can you give a link on a photo that is not rotated by Piwigo?
Offline
Hi plg,
thanks for the answer. Here some answers:
1) under Administration > Photos > Add > Settings (I assume that is what you meant, not Configuration?) I only have two blocks, one named "Web size photo" and the other "Thumbnail"
so rotation is not depending on imagemagick, good.
I tested with a few more images and found out that it does work indeed sometimes, and sometimes it does not. So the photos from my iPhone are shown correctly in shotwell/nautilus, but not rotated in piwigo, while the photos from my camera are correctly rotated.
Here is a photo that does not rotate well in piwigo:
http://www.logic.at/people/preining/IMG_0667.JPG
Hope that helps to track down why it isn't rotated.
Thanks and all the best
Norbert
Offline
I've tested with your bicycle photo and rotation is perfect either with GD or Imagick (the ImageMagick binding for PHP).
My feeling is that you don't have the imagerotate function available. Please check it :
1) activate plugin LocalFiles Editor on screen [Administration > Plugins > Manage]
2) go to [Administration > Plugins > LocalFiles Editor], tab "Local config" and paste the following code:
if (function_exists('imagerotate')) { file_put_contents('/tmp/piwigo.log', "OK : function imagerotate exists\n", FILE_APPEND); } else { file_put_contents('/tmp/piwigo.log', "K0 : function imagerotate does not exist\n", FILE_APPEND); }
3) Click on the "Save file" button
4) Go to Administration Home
5) open file /tmp/piwigo.log and tell us what's the message
If my feeling is correct, then maybe ImageMagick can save you :-) :
1) sudo apt-get install php5-imagick
2) sudo /etc/init.d/apache2 restart
3) do the test once again (is there a "High Definition" section on [Administration > Photos > Add > Settings] ?)
Offline
Hi plg,
thanks for tracking that down.
First test: piwigo.log contains the KO string, no imagerotate function (should that be provided by the gd module?)
Second test: installing php5-imagick, now a HD part is in the Admin > Photo > Add > Settings and uploaded photos are rotated.
Thanks a lot.
BUT: Why some photos have been rotated and some photos have not been rotated I don't understand ;-)
All the best
Norbert
Offline
I've been following along. I found that ubuntu hardy and a few other versions have a bug with php5-imagick that results in the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - /usr/lib/php5/20060613/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
I fixed that. I then uploaded a few photos with piwigo -> admin -> photos -> add. They correctly autorotated.
When using digikam's built in upload -> piwigo they did not auto-rotate, even though they display correctly in digikam. I tried adding via the localfiles editor:
$conf['upload_form_automatic_rotation'] = true;
That did not fix the problem with digikam uploads.
Does that effect programs that directly use <piwigo_home>/ws.php? Is there a different variable I should set?
Does it look like it's a bug with Digikam?
Is it possible that the poster is uploading using more than one method and only one method is broken?
Offline
norbusan wrote:
BUT: Why some photos have been rotated and some photos have not been rotated I don't understand ;-)
Because the photos have been rotated before being sent to Piwigo. I don't see any other reason.
Offline
sbyke, please use another thread, your problem is a bit different and would like to mark this topic as resolved :-)
Offline
sbyke, you can post on [Forum, topic 17678] Rotation of images does not work when exported from digikam or create your own topic.
Offline