Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Optional integration with ImageMagick as a new image manipulation backend - How


Go to End


4 Posts   2736 Views

Avatar
tazzydemon

Community Member, 135 Posts

30 January 2013 at 11:26am

Guys

3.1 boasts the ability to use Imagemagick as in "Optional integration with ImageMagick as a new image manipulation backend" but how? I cant see a config anywhere except perhaps in Image.php:

static $backend = "GDBackend";

There is no other reference to Imagemagick or a suitable "convert" in the code that I can find.

Julian

Avatar
Tony Air

Community Member, 13 Posts

2 February 2013 at 3:21pm

Add to _config.php this line:
if(class_exists('Imagick')){Image::set_backend('ImagickBackend');}

it has also few issues so here's a patch:
https://github.com/a2nt/sapphire/commit/ef3613c8ff95b7e278cb1daa2266edf63772ec2b

Avatar
tazzydemon

Community Member, 135 Posts

3 February 2013 at 12:41pm

Edited: 03/02/2013 1:01pm

I didn't try looking for imagick as a string! Thanks for that.

Any clues as to how to get the image class to make a thumbnail from a pdf? Imagick does that fine but the default in SS is an icon

Perhaps hack the definition in File.php

Since if imagick is used people will always want pdf thumbs this should be standard.

Julian

Avatar
Tony Air

Community Member, 13 Posts

4 February 2013 at 2:56am

Agreed, but it's still buggy as u can see in framework/filesystem/ImagickBackend.php some variables like $destX and $destY aren't set. I guess it's just draft version.