views:

81

answers:

2

I have been using ImageMagick running on a Windows 2003 server that is called in a PHP script to create a thumbnail of an image using the following command:

$cmd = "convert.exe \"". $fullpath . "\" -resize \"" . res_image_width ."x" . res_image_height . ">\" \"". $fullpath. "\" 2>&1";
passthru($cmd);

I have now moved this functionality to a Linux box running CentOS and on which I have installed ImageMagick libxml2-devel :

yum -y install ImageMagick libxml2-devel

What do I need to change to the PHP code to perform the same action on an image, clearly I can tell that .exe is a windows thang so need to change the path to the linux format but I cannot find the 'convert' file anywhere, in windows it is at C:\Program Files\ImageMagick-6.3.3-Q16/convert.exe

Do I need to install more files on to the linux machine?

cheers all

+1  A: 

For OpenSUSE, ImageMagick convert is saved in /usr/bin/

Why not use ImageMagick PHP module? This way your code will be cross-server. Read here.

Andrejs Cainikovs
A: 

To find out where is convert just execute

which convert

or

locate convert
FractalizeR