ImageMagick

So I want to use ImageMagick for my MediaWiki installation (right now, PNGs look icky when resized, like on this page). I tried just setting $wgImageMagickConvertCommand in the MediaWiki LocalSettings.php file to /usr/bin/convert, but it didn’t seem to help. So I tried installing my own copy, but it doesn’t seem to have the convert file (I think it’s trying to put it in /usr/bin). I really can’t tell if this is an issue with the DH setup, or with MediaWiki…

emufarmers.com
Very little to do with either emus or farmers!

This is due to the fact that mediawiki uses the default imagemagick settings. I would install your own copy and change the config to use -resize instead of using -scale. You can also improve the quality with the -quality flag.

Save [color=#CC0000]$97[/color] on Dreamhost plans by using promo code: [color=#CC0000]SRVR97[/color]

Can you give me an exact command for what I’d want to put into the shell? I’m a bit flustered with trying to compile ImageMagick right now.

Beyond the setup of IM itself, how would I get MediaWiki to look for the right things?

emufarmers.com
Very little to do with either emus or farmers!

Honestly, I’d have to look through the source as it has been a while since I have used MediaWiki. Give me about 15 minutes on this thread and check back. I’ll take a look.

Save [color=#CC0000]$97[/color] on Dreamhost plans by using promo code: [color=#CC0000]SRVR97[/color]

In your Localsettings.php file where it uses:
$wgImageMagickConvertCommand = “/usr/bin/convert”;

Change it to:
$wgImageMagickConvertCommand = “/usr/bin/convert -resize 25x25 -quality 75%”;

Now that is just an example, this would make the size of the image a 25 width x 25 height and make the image 75% of its original quality.

Save [color=#CC0000]$97[/color] on Dreamhost plans by using promo code: [color=#CC0000]SRVR97[/color]

I think I found the problem; it actually wasn’t ImageMagick’s fault, nor was it anything incorrect with my MediaWiki configuration for it: It’s that the installation is still using old thumbnails, and doesn’t update them with the ImageMagick settings. I realized this when I looked at the file path for one of the thumbnails, tried renaming the file, and noticed that the server didn’t regenerate it.

It looks like I won’t need any fancy configuration options or setups after all. Lacking a better option for regenerating all the thumbnails, I simply deleted the thumb directory, and that seems to have set things straight. Not quite the solution I was expecting, but it’s a solution nonetheless. :slight_smile:

emufarmers.com
Very little to do with either emus or farmers!

Now I have one more issue: I want to adjust the quality of the thumbnails which ImageMagick generates, as you suggested. The thing is, if I try adding the line as you wrote it, the server won’t generate any thumbnails: It thinks that the -quality stuff is part of the ImageMagick path, and gets confused! I thank you very much for your help, but I think I’m going to need you to revise it. :wink:

emufarmers.com
Very little to do with either emus or farmers!