Simple "Convert" won't work

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
HowBazaar.ca

Simple "Convert" won't work

Post by HowBazaar.ca »

Somebody please help.

I have the following code in PHP.

----------------------------------------------
if (file_exists('image.jpg')) {
echo 'file exists';
}

exec("usr/local/bin/convert image.jpg image.gif");

if (file_exists('image.gif')) {
echo 'it worked';
} else {
echo 'no you fool, doesnt work';
}
----------------------------------------------

The image resides in the same folder as my code. As you might have guessed, I get the "file exists" and then "doesnt work" message.

What is wrong?

Thanks.
fisheggs

Re: Simple "Convert" won't work

Post by fisheggs »

Just a guess, but should there be a '/' before the usr in

exec("usr/local/bin/convert image.jpg image.gif");
HowBazaar.ca

Re: Simple "Convert" won't work

Post by HowBazaar.ca »

Thank you fish eggs, that was the problem.
Post Reply