I can't seem to have the autorotate feature to work. I added the autorotate effect to my image style but still the vertical images I upload are still showing in a wrong orientation. is there something else I should do.

I'm using version 7.x-1.x-dev

CommentFileSizeAuthor
#2 image_metadata.txt13.11 KBchalee
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dman’s picture

IFF you have a camera that contains a positioning sensor (something internal that makes it know when it's being held sideways) THEN there is some metadata attached to the image that says "I took the picture like this but you are supposed to look at it like that"

It basically encodes the image upside-down (if that's how the camera was held) but also tells us that it was upside-down at the time.

imagecache_autorotate looks for that data and rotates the image to sit on the screen. If that data is there.

If you have a camera that didn't recode that data - then nothing is done.
Sorry, it doesn't do magic or image recognition for you.

If you have an image that you think DOES record that data but it's not being used - post a sample up here or run exiftool (or similar) over it to see what the metadata looks like.

chalee’s picture

FileSize
13.11 KB

Thanks for the quick response. Find attached output from exiftool I ran on one of the photos. Check and see if there isn't enough info for your module? I see some info on orientation in the output i.e (Orientation : Rotate 270 CW)

chalee’s picture

Apparently the autorotate feature is not working on my development server running Windows. When I upload the website to my hosting server which is linux based the autorotate works. The only problem on the hosting server is that the rotated images seem to have lost the aspect ratio. They appear stretched sideways.

FYI I'm applying the following effects in that order.

1. Autorotate
2. Scale width to 548px (allowing upscaling)
3. Overlay (watermark image)

fietserwin’s picture

Title: How does the autorotate effect work » Text dimensions callback of autorotate
Component: Miscellaneous » Code
Category: support » bug

Is the exif extension enabled?

Currently, the code checks on image generation and writes to the watchdog. I think it should also check for the extension on effect creation, thus in the admin screen and log a proper message on the screen.

Regarding the stretched image, that is a bit strange, but must have to do with the dimensions callback of the autorotate effect not functioning properly.

Changing into a bug report for these 2 parts:
- warning on admin screen if exif extension is not enabled
- dimensions callback not working properly?

fietserwin’s picture

Title: Text dimensions callback of autorotate » Autorotate: check for exif extension and test dimensions callback
dman’s picture

Interesting and thanks for the troubleshooting you did for yourself. It's helpful - and of course hard for us to replicate. When it comes to available libraries/versions on the server etc.

It does sound like the dimensions are not updated (d7 has an annoying new callback for this that doesn't always fit too well in real-life cases) when the image finds itself needing to switch. So the system thinks it's the old dimensions even though we are clever enough to see that it should change.

Certainly needs looking at.

fietserwin’s picture

Status: Active » Fixed

Appears to already be fixed long time ago (I guess shortly after this issue was created). Marking it as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.