I've played with this sandbox project a bit, and it's leading the pack for me in the way of cropping tools. I'm not seeing any way to use it with the media module though. Not sure what would be involved there, but that would be awesome.

Obviously getting this promoted to full project status is a higher priority, but I figured I'd drop this here as a feature request.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

willvincent’s picture

Status: Active » Needs review
FileSize
2.07 KB

I dug into this a bit further. As it turned out this is really easy to implement.

Here's a patch.

willvincent’s picture

Priority: Minor » Normal
FileSize
2.57 KB

Previous patch only works with the 2.x branch of media module. This patch should work for both 1.x and 2.x branches.

Note: This patch is untested, I've been unable to get the 1.x branch of media working at all today for some reason, but this is the same approach that the javascript crop module takes for compatibility with media 1.x and 2.x.

Previous patch in comment #1 does for sure work, I exercised it pretty thoroughly.

willvincent’s picture

Ok.. Not sure what was going on yesterday, but I finally got media 7.x-1.2 working again. Here's an updated patch that works with both the 1.x and 2.x branches of media.

Only difference between this and the patch in #2 is an if statement checking whether or not the image dimensions are available, and if not omitting that from the alt tag of the generated image markup that pointcrop works with. I've tested this now with both media-7.x-1.2 and media-7.x-2.x

Seems solid to me. Hope to see it included!

willvincent’s picture

Forgot to attach the patch file in comment #3.

jdanthinne’s picture

Working fine for me with Media 7.x-2.x, although the image should be resized (big images aren't contained in the Media popup window).
This module should be released, it's one of the best solution for smart cropping!

willvincent’s picture

Agreed, but it stalled in the project application queue, ultimately being auto-closed for no activity.

https://drupal.org/node/1820260