Please could you add support for flipping and rotating images.

This would make this module the ultimate tool for controlling the display of uploaded images.

Media Image Transform offers flipping but it is not as good as this module.

Comments

matthijs’s picture

Status: Active » Postponed

Hi,

That would be a nice feature indeed! But I'm postponing this because it's a bit out of scope and I currently don't have the time to add new features... Maybe sometime in the future... Keep an eye on this issue! :-)

Matthijs

matthijs’s picture

Project: Manual Crop (old) » Manual Crop
Version: 7.x-1.x-dev » 7.x-1.4
Anonymous’s picture

(auto) rotate important?

Quote https://drupal.org/node/976434#comment-3729464:

This is because macOS finder use exif informations to auto-rotate picture in previsualisation. But all pictures are saved with the same ratio. When I take a picture with my iphone rotated at 90° the picture is saved at 90° but the finder rotate it auto-magically to display it in the correct orientation, due to the exif informations stored in the picture.

I think more and more photo's are taken with a camera with auto-rotate function.
Uploading this images gives a 90 deg. rotated result in manual crop.

daniel wentsch’s picture

Issue summary: View changes

This is really a huge issue for any user generated content thats supposed to be cropable. Has anybody found a workaround yet? Pictures should get rotated right upon uploading I guess.

Anonymous’s picture

https://www.drupal.org/project/imagecache_actions

there is a submodule autorotate in imagecache actions (not tested with manual crop).

daniel wentsch’s picture

@cmseasy: unfortunately, it does not work with manualcrop (there's an issue floating around here about that specifically, too).
EPSACrop, though, does work with Autorotate.

I blogged about the setup that worked for me (though I'd prefer using manualcrop as it's much more sophisticated than EPSACrop:
http://www.wentsch.me/drupal-keep-exif-orientation-and-allow-manual-crop...

cthshabel’s picture

Uh oh. I am going to be facing this same issue it sounds. I was hoping manual crop would support autorotate from imagecache_actions. The exif function really does work great (no need to have to decide which way to rotate as a user because it just does it!)

We are sticking with manual crop. As far as I am concerned, it is the most evolved crop module. It supports S3 stream wrappers (HUGE plus), so we are pressing forward and hoping there is a solution to this.

Any possible updates maintainers?

cthshabel’s picture

Daniel Wentsch,

Thanks a lot for commenting and also linking the blog post you wrote and also the link to drupal answers. I am surprised this hasn't gained more traction?

ESPACrop does seem like a good alternative; unfortunately, Manual Crop has been patched recently to allow S3 to be the upload directory, which is a must for us. I hope we can find a solution soon.

1kenthomas’s picture

1) I'm not clear that this doesn't work with the Autorotate action at this point, as long as the image is local. Could someone clarify.
UPDATE: autorotate will not work WITH MANUALCROP as a solution to desired response to EXIF cues from mobile, given that Manual Crop excludes any other ImageCache action from executing before the Manual Crop action. HOWEVER, simply disabling the immediately aforementioned aspect of Manual Crop is not sufficient to solve the issue at all, as Manual Crop would still need to be EXIF-Orientation aware at many other layers; see below.

2) I'm also not clear on the use cases when this module rather than autorotate action should be used, given current model. Ditto: please clarify.
UPDATE: see above and below. It is not clear that ImageCache Autorotate is the best/desired solution to deliver functionality.

1kenthomas’s picture

Title: Add support for Flipping and Rotating images » Respond to EXIF orientation flags (mobile uploads)
Status: Postponed » Active

Changing title to what it seems everyone wants to accomplish, I think -- given that autorotate and other modules otherwise support flip / rotate.

Mobile and other devices such as digital cameras, currently set an EXIF orientation flag to indicate whether images will need to be re-oriented for proper display. Manual Crop (and a wide variety of other Drupal modules and layers) is currently insufficiently responsive to this EXIF data, leading to undesired results (improper orientation) from many mobile and other devices.

Reaction to EXIF orientation flags and appropriate orientation display and cropping based thereupon, may thus be a highly desirable feature for the module.

It is not clear whether this module should implement its own handling of such situations via exif_() and graphic layer functions, or integrate with another module such as ImageCache Autorotate to achieve desired results.

Additionally, current exif_() functions support reading only from local files, not external systems (via wrappers). Writing the image to local temp is one potential work-around to this problem.

This comment may not reflect all use cases. Additional flip/rotate options may be desired beyond simple response to EXIF Orientation cues, and/or such functionality may already exist by other modules / means.

Plupload may provide desired functionality (?).

Further (possibly confusing) discussion of solving via integration with ImageCache Autorotate can be found at https://www.drupal.org/node/2034875

Changing status to Active; I had a mostly working hack for -HEAD, and expect to review -dev code again in 1-5 days.

daniel wentsch’s picture

Great Roundup of the issue @1kenthomas

Just one addition: this is by no means only an exclusive issue of mobile phone cameras. Almost any digital camera, no matter if SLR or point & shoot, have an orientation sensor these days and store orientation using EXIF flags. So it really affects a large percentage of any picture that has been taken in recent years.

Regards,
Daniel

1kenthomas’s picture

Assigned: Unassigned » 1kenthomas

Self-assigning for now as client has decided to move forward. Seems to me the core issue is to properly respond to EXIF, not to integrate with another module.

bobbydank’s picture

I found a way to fix the issue. I used the Image EXIF Autorotate module in conjunction with Imagecache Actions and Autorotate to apply autorotation as the image is being uploaded. Not after it is uploaded. So you will still need Imagecache Actions and Autorotate, this module just automates the process and applies autorotation without the need of an image style.

https://www.drupal.org/project/image_exif_autorotate

ptmkenny’s picture

Confirming that the Image Exif Autorotate is compatible with Manual Crop and fixes the issue for me.

matthijs’s picture

Assigned: 1kenthomas » Unassigned
Status: Active » Closed (won't fix)

I'm closing this since there's an acceptable solution.