Image Rotate Problem

Hi All,

I'm new to ZenPhoto and loving it, but experiencing problems with some images are not auto rotating correctly, while others auto rotate just fine. Manually rotating images produces some bizarre results that I can get into in a moment.

Here's the scenario:

I have two photos

IMG_5287.jpg
- This image rotates correctly.
- shot on a Canon SD630
- 1.2 MB
- EXIF Orientation = 8 (fyi: http://www.impulseadventure.com/photo/exif-orientation.html)

The behavior that I see is that the image 5287 displays perfectly (thumbnail is good, when clicking on the thumbnail the 'fullsize' images render well, and the original images displays, although not rotated).

IMG_9298.jpg
- This image does not rotate correctly.
- shot on a Canon SD790is
- 3.3 MB
- EXIF Orientation = 6 (fyi: http://www.impulseadventure.com/photo/exif-orientation.html)

This image's thumbnail does not render, rather a box with a blue question mark appears. When I click on the un-rendered thumbnail, the 'full size' image does not render and a similar blue question mark appears. However, the image does show a large "portrait shaped" box, indicating that some rotation is trying to occur. When clicking on the full image, the original image displays unrotated in the browser as expected.

When I disable the auto-rotate function from the Admin page, the thumbnail renders, however, the full size image renders oddly. The image does not simply display un-rotated, but rather, it is displayed un-rotated, but compressed into a "portrait" sized box.

If I then go into that particular image's admin page and try to rotate the image manually, the option to rotate is grayed-out.

When I turn back on the auto-rotate function, and go to the admin page for the image, the rotation is selected as 270 degrees. When I select none, for rotation, the image renders un-rotated, in landscape form (correctly), not compressed into a "portrait" sized box.

The ZenPhoto gallery that I am setting up is private, so unfortunately I can't share with the forum the actual page, but the photos in question are available here:

http://o2bayarea.org/ZenPhotoTestImages/

I have some guesses that the image (IMG_9298.jpg) is not auto-rotating correctly because:
A - it has a newer EXIF format that GD doesn't like?
B - GD doesn't like the orientation 6?

I welcome your comments, feedback and solutions.

Many thanks,
Mike

-----------
Other info:

I am currently running:
Zenphoto version 1.2.6 [4335] (Official Build)
Current gallery theme: default
PHP version: 5.2.6
Graphics support: PHP GD library bundled (2.0.34 compatible)
PHP memory limit: 96M (Note: Your server might allocate less!)
MySQL version: 5.0.67

I am hosted on Dreamhost running PHP5 FastCGI:
http://php.dreamhosters.com/php5-cgi/

Comments

  • If you change the auto-rotation setting you would need to purge your cache to "synchronize" the image to the cached version.

    The rotation option is greyed out only if your configuration does not have the requisite rotation function. If this is the case, the rotation will not work either.

    The rotation values are reasonable. Maybe there is a problem with the server memory and the rotation is running out of memory during the processing. (Beware of the warning that the PHP Memory limit may be meaningless on any particular server.)
  • Oh boy... this is my concern too. I am not "code guy" though. I am "load it up on my Bluehost account and let it fly guy". I cleared my cache, but the thumbe and intermediate photos still did not work. I unchecked the auto rotate box and the photos re-appeared but in their original orientation.

    I am working with a homebuilder and posting photos to a gallery for them. Most of the photos are larger in size and many of them are 90 degrees off. I was hoping to not have to manually edit the photos in Fireworks. Any guidance would be appreciated as I am throwing up other galleries to additional sites.

    Thanks
    Site is www.artistichomes.com / gallery at www.artistichomes.com/index.php
  • Well, from your description, the problem is the memory limit. Guess you will at least have to make the images smaller or rotate them before uploading.
  • acrylian Administrator, Developer
    To add, this is not a limitation of Zenphoto but of your server. Please see the troubleshooting on our site.
  • I am having the issue sbillard references:

    "The rotation option is greyed out only if your configuration does not have the requisite rotation function. If this is the case, the rotation will not work either."

    I have not been able to find what this requisite function is in the forums. Can someone please point me in the right direction.

    Thanks
  • the GD library function `imagerotate()`
  • I am still unable to rotate images. This feature would probably be the biggest time saver for me if I can get it to work. It is probably a limitation regarding my server, however, if the PHP functionality is included with release 1.2.9, then it still does not work for me. I found the image_rotate_gd.php posted on the site, but don't know if this will help or in which directory to install it. Can you enlighten me, either on how to cure the issue, or if I should give up and do them in my editing software prior to uploading.
  • The GD rotate functionality is still provided in 1.2.9 (your server must support it for it to work). If it's not working, chances are that your server doesn't support it.

    The `image_rotate_gd` plugin is an alternative that aims to replace that functionality with a plugin. This plugin works like any other Zenphoto plugin; you can simply drop the file in the `plugins` directory of your Zenphoto installation and then activate it in the admin back-end to get it working.
  • I set it up as kagutsuchi instructed and now I get the following error when I try to access the site:

    Fatal error: Cannot redeclare imagerotate() in /hermes/bosweb/web044/b449/d5.psyresea/public_html/photojournal/familynfriends/plugins/image_rotate_gd.php on line 55

    Can you help me understand what is happening here?

    Thanks
  • acrylian Administrator, Developer
    You have apparently enabled the rotate plugin although your server has the function already installed. (there is apparently a check for that missing..)

    Maybe that is not configured correctly, best you contact your host.
  • Thanks for the feedback. I'll take up the issue with my hosting service (Dot5Hosting). I know they offer ZP as an optional install, although I was using ZP for some time before they offered it. Perhaps they have rotation enabled and it is a config issue.
  • I installed the plugin, but I got a ("saveplugins" Cross Site Request Forgery blocked) error, after selecting it, and clicking "Apply". I thought... permissions? I tried chmod'ing it to both 755 and 777, but still the same result. I see that it's "unsupported", but if anyone had any pointers, I'll love to hear them.
  • What version of Zenphoto are you using? I think that was a bug in a somewhat recent version, so if you aren't on the latest (1.4.0.2), please try updating.
Sign In or Register to comment.