i'm currently using the Imagick module for Drupal 8 and the imagick php extension on the server. Whenever I try to resize images with this tool, using the settings below, I get a really down sampled version of the image, as if the all the meta data is still stripped although I specify to keep them.

As seen below the image gets really pixelated and sort of "over saturated". However I got this to work on a local server using the same settings. I just can't get it to work properly on the remote.

Setting: enter image description here

Desired result: enter image description here

The result I get: enter image description here

So far i have tried already to switch off the meta tags, but this seems what was originally the problem on my localhost. I have also tried some of the other filters and changed the quality, but it all doesn't seem to matter. So what am I doing wrong, or what could I try to get the desired result?

  • You can try ssh and run command php -m to check php module enabled. – Jonh Jan 24 '19 at 8:19
  • It's enabled. It just seems like it's ripping the colorspace out, which should be in the metadata. And as you can see, i didn't enable that setting. – Thomas Scheffer Jan 24 '19 at 8:33
  • 2
    I'm not sure anyone's going to be able to help you with this from afar, you're basically saying that you're using a third party library which works differently in different environments, despite having the same version installed and settings configured. Drupal doesn't have any say in how Imagick works, so Drupal experts probably aren't the right people to ask about this. Have you confirmed that everything works as expected outside of Drupal using Imagick in both environments? – Clive Jan 24 '19 at 8:44

Yes, this module has a critical error for your problem. A week ago an issue was opened and need to be revived. But you can add your own patch to the module by yourself. Here is the issue and solution for Drupal v7: https://www.drupal.org/project/imagick/issues/3026933

and you can apply to Drupal v8 under file imagick\src\Plugin\ImageToolkit\Operation\imagick

protected function process(Imagick $resource, array $arguments) {
    $color = $arguments['HEX'];
    $color = empty($color) ? 'none' : $color;
    //return $resource->colorizeImage(new ImagickPixel($color), 1);
    return $resource->colorizeImage(new ImagickPixel($color), 1, true);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.