Problem/Motivation

'Set canvas' effect is not compatible with image magick.

Steps to reproduce

Add Set canvas effect 600*400 #ffffff 100% to image with size 400*400.

And have no effect... But with gd all ok.

image magick 6.9

CommentFileSizeAuthor
#5 image_effects.patch.txt672 bytesmacherif

Comments

vvs created an issue. See original summary.

kruser’s picture

Same, I'm getting:

The image toolkit 'imagemagick' failed processing 'set_canvas' for image 'core/modules/image/sample.png'. Reported error: Error - Call to undefined method Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\SetCanvas::addArgument()

ImageMagick Version: 4.0.2
image_effects Version: 8.x-3.6

ImageMagick 6.9.11-60

mistergroove’s picture

Also getting a similar issue:

The image toolkit 'imagemagick' failed processing 'set_canvas' for image 'public://productimages/19577/1719151873/19577.png'. Reported error: Error - Call to undefined method Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\SetCanvas::escapeArgument()

Drupal core 10.3.6

imagemagick: 4.0.2
image_effects: 8.x-3.6

Works on server with ImageMagick: 6.9.10-23 but not on server with ImageMagick 6.9.11-60

karlshea’s picture

This is due to #3414601: Switch command line escaping to Symfony Process, both addArgument and escapeArgument were removed in that issue.

Looks like 4.x of this module fixes those calls, but 8.x-3.x of this module shouldn't be used with imagemagick >= 3.7 (I think?). I'm not sure how composer let me get into the situation where that combination was installed, but it did happen for me.

macherif’s picture

StatusFileSize
new672 bytes

Same patch suggested on other similar issue worked for me.

dasginganinja’s picture

I am fairly certain that this was the "other similar issue" -- https://www.drupal.org/project/exif_orientation/issues/3477919

dasginganinja’s picture