Page 1 of 1

Convert function not working

Posted: 2009-07-07T04:38:35-07:00
by inthesky
Hi

I'm using ImageMagick-6.5.4-Q16 on XP with Apache (Ghostscript is also installed) to try and convert a pdf to png. Using the full path to the convert.exe works fine
e.g.

Code: Select all

exec("C:\progra~1\ImageMagick-6.5.4-Q16\convert.exe -colorspace rgb -geometry 460x460 ... etc")
but using just the convert keyword fails to work, with the errors of invalid parameters.
e.g.

Code: Select all

exec("convert -colorspace rgb -geometry 460x460 ...")
Any idea how to fix this?

Thanks

Re: Convert function not working

Posted: 2009-07-07T08:49:16-07:00
by Bonzo
I would say there is something wrong with the path; try installing again ?

Re: Convert function not working

Posted: 2009-07-07T08:55:40-07:00
by inthesky
Yeah I've reinstalled a couple of times now and added gs to the delegates file, but it's still doing the same thing.

Re: Convert function not working

Posted: 2009-07-07T11:20:16-07:00
by el_supremo
That may be the usual problem with the conflict of names between IM's convert and the Windows "convert" program (which complains about invalid parameters).
Changing the Imagemagick program's name to imconvert and using that instead will avoid the conflict.

Pete

Re: Convert function not working

Posted: 2009-07-07T13:30:28-07:00
by Bonzo
I wonder why some people have problems with IM convert and Windows convert ?

I have installed IM 3 times on my old XP PC and once on my new Vista PC without any problems.

Re: Convert function not working

Posted: 2009-07-07T14:13:17-07:00
by el_supremo
Bonzo wrote:I wonder why some people have problems with IM convert and Windows convert ?
That's a good point Bonzo, so I first checked to see if using "convert" in a DOS window caused a problem on my system and it didn't.
I had a look at the PATH environment variables on my system and the ImageMagick path is set near the front of the PATH variable for the System Variables (not the user). If I change that PATH by just removing the reference to the ImageMagick directory and then open a new DOS window, the convert fails.
So, it looks like what is really needed is to ensure that the path to the directory containing the ImageMagick convert.exe program is in the system PATH variable.

Pete

Re: Convert function not working

Posted: 2009-07-08T01:29:43-07:00
by inthesky
Renaming the convert exe doesn't seem to help either. Checked the PATH and that all seems to be correct, so I'm not really sure what's up with it. I had managed to get it working on a previous old machine, so this is all quite baffling.