Installing ImageMagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
phpeter
Posts: 3
Joined: 2012-07-06T02:51:16-07:00
Authentication code: 13

Installing ImageMagick

Post by phpeter »

I’m trying to install ImageMagick (ImageMagick-6.7.8-1-Q16-windows-dll). I want to install it on my Windows vista pc. I just followed the installer, I installed it to c:\imagemagick. I didn’t change any of the standard settings. At the last point it asked me to test it in my MS-DOS prompt. I typed c:\>convert logo: logo.miff.

I got the following error. “Convert.exe: unable to open ‘logo.miff’: permission denied @ error/blob.c/OpenBlob/2638”

Did I do something wrong, how can I fix this problem??

Ps. I want to install ImageMagick so I can use it at my PHP script. When I got the previous working do I have to take some more steps or was this it?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Installing ImageMagick

Post by Bonzo »

There is a windows program called convert as well which might be your problem. The installer should have asked something about adding the Imagemagick path to you enviromental variables - did you say yes?

I have installed multiple times on different PCs without any problem so it is strange how others have problems.

Onto php - are you using XAMPP or similar? I do and as long as Imagemagick is installed XAMPP picks it up straight away. If you are intending on using Imagick I wish you the best of luck getting that installed.

If you are going to work with pdf files you need to install ghostscript before you install Imagemagick.

Check out my website for some examples and notes on Imagemagick and php usage.
phpeter
Posts: 3
Joined: 2012-07-06T02:51:16-07:00
Authentication code: 13

Re: Installing ImageMagick

Post by phpeter »

I deinstalled ImageMagick. And reinstalled it to check your question about - path to the enviromental variables. But they didn’t ask me, the only thing I selected was “Add application directory to your system path”

Image

So now I’m stuck I have no idea how to proceed form here, any suggestions?
phpeter
Posts: 3
Joined: 2012-07-06T02:51:16-07:00
Authentication code: 13

Re: Installing ImageMagick

Post by phpeter »

I guess the Windows program convert was messing everything up, that still doesn't work. But when I use this little code it works perfectly.

Code: Select all

<?php
exec("convert site-img/test.jpg -thumbnail 25x25 output.jpg");
?>
<img src="output.jpg">
Now I have 2 last questions (for now :P)
I'm on my local server now, is this also possible on a paid server??
My second question which benefits has imagick over imagemagick??
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Installing ImageMagick

Post by fmw42 »

My second question which benefits has imagick over imagemagick??
Imagick is not being maintained to keep up with Imagemagick. So it has fewer commands and the documentation is sparse.

see comparisons for speed tests at:

viewtopic.php?f=4&t=16779
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Installing ImageMagick

Post by Bonzo »

With your original code you could try using the full path to convert rather than just convert and see if that works. Other people rename the Imagemagick convert program.

Most servers have Imagemagick installed these days but some are old versions that come with a Linux/Apache/php install.

Do you have a host already? If so try running this to find the version installed:

Code: Select all

<?php
echo "<pre>";
system("convert -version");  
echo "</pre>";
?> 
If not ask them if its installed before before you sign up also what version.

Imagick can be faster than Imagemagick through exec( ) BUT the documentation is usualy out of date if there is any at all. I have been trying to write some examples for my website and if you are doing something simple it can be done.
Imagick will only work with the operators the developers have written ( the developers of Imagemagick are not the same as Imagick ). It is safer than Imagemagick as it does not use exec( ) which can be exployted but if you make sure any user input is safe you will be OK.

Basicly I prefer exec( ) and would not use Imagick - also check Imagick is installed if you want to use it before signing up as it has to be installed seperatly to Imagemagick.

Installing Imagick on a localhost can be vertualy impossible; I used to have it installed on my localhost but when I upgraded XAMPP last time I can not find a dll that will work.
Post Reply