Provide additional image styles through the ImageMagick Advanced module. Specifically:

  • Drop shadow
  • Perspective transform
  • Blur
  • (enable) Sharpen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bernman’s picture

Patch attached. This is my first effort at rolling a patch. It applies to the imagemagick_advanced module specifically. The tar file contains module-specifc CSS and an image file used in one of the admin forms.

sun’s picture

Sorry for the late reply.

We should handle the sharpen option in #1185186: Sharpen effect exists, but is not exposed in the UI

With regard to the other effects, I think it would also be best to split them into separate issues... That said, the implementation looks a bit custom to me?

bernman’s picture

I'll do the extract for the sharpen UI unless you have any proposed changes to the UI I've put in for that option. With regard to the rest, can you clarify what you mean by "custom" a bit please? It is true that I've set hard-coded defaults for many parameters to keep the UI simple for end-users (the breadth of options can be overwhelming unless you're an ImageMagick expert). Nevertheless, if you have any suggestions/proposals in this regard, please let me know, I'd be happy to have the feedback.

jpamental’s picture

I've updated the patch as one chunk fails and has already been fixed in the module. Once that's removed it applies cleanly and functions well on both the dev and release versions (with the originally attached CSS and image files added to the 'imagemagick_advanced' folder)

jpamental’s picture

Version: 7.x-1.x-dev » 7.x-1.0
FileSize
14.57 KB

I've rerolled the patch with two main changes:

1) I've changed the reference to the sample image to point back to the original 'sample.png' in the core image module (it's the same image as the one included above)

2) I've updated the patch to create the CSS file

Now you can just install this patch and don't have to worry about the other files referenced above.

I've also updated the version reference, as this can be applied to either the release or the dev version of the module.

nelslynn’s picture

This patch will conflict with the latest version of imagecache_actions 7.x-1.6, where both contain the function: image_imagemagick_blur(stdClass $image, $intensity)

You will get a white screen of death with the following:
Fatal error: Cannot redeclare image_imagemagick_blur() (previously declared in /home/reclaime/public_html/sites/all/modules/imagecache_actions/canvasactions/canvasactions.inc:1178) in/home/reclaime/public_html/sites/all/modules/imagemagick/imagemagick_advanced/imagemagick_advanced.module on line 189

guysaban’s picture

I confirm what @nelslynn wrote above.

I got the same conflict. Due to image_imagemagick_blur() I got Error: Cannot redeclare image_imagemagick_blur() (previously declared in ... sites/all/modules/imagecache_actions/canvasactions/canvasactions.inc:1178) ... in modules/imagemagick/imagemagick_advanced/imagemagick_advanced.module, line 207

using imagemagick 7.x-1.0
using imagecache_actions 7.x-1.7

nelslynn’s picture

Careful upgrading to the most recent imagecache_actions 7.x-1.9. This patch will cause WSD due to duplicate function: image_imagemagick_perspective()

Cannot redeclare image_imagemagick_perspective() (previously declared in /home/site/mysite.com/sites/all/modules/imagecache_actions/canvasactions/canvasactions.inc:1599) in /home/site/mysite.com/sites/all/modules/imagemagick/imagemagick_advanced/imagemagick_advanced.module on line 212

I have removed the image_imagemagick_perspective() function from the patch as so far so good, no issues.