Page 1 of 1

i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-06T12:53:20-07:00
by thisisvlad
i can't seem to run imagemagick commands on an image url. i think it might have something to do either w/ my imagemagick install or my server configuration, because the command works fine on one of my servers, but not on the other.

here is the command:

convert "http://www.thisisvlad.com/gallery/album ... .sized.jpg" -colorspace RGB -thumbnail "850x550>" "/var/www/html/app/tmp/images/test.jpg"

and i get the error:

convert: missing an image filename `/var/www/html/app/tmp/images/test.jpg'.

any ideas on how to fix it? did i just install imagemagick wrong?

Re: i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-06T13:14:08-07:00
by Bonzo
From one of Anthonys replys to a similar problem:
IM did not find a wget delegate to download the URL
Could wget be the problem ?

Also I would not have all the " and use relative paths rather than absolute.

Code: Select all

convert http://www.thisisvlad.com/gallery/albums/NYC/Guggenheim_7_001.sized.jpg -colorspace RGB -thumbnail 850x550> /var/www/html/app/tmp/images/test.jpg

Re: i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-06T13:20:50-07:00
by thisisvlad
Bonzo wrote:From one of Anthonys replys to a similar problem:
IM did not find a wget delegate to download the URL
Could wget be the problem ?

Also I would not have all the " and use relative paths rather than absolute.

Code: Select all

convert http://www.thisisvlad.com/gallery/albums/NYC/Guggenheim_7_001.sized.jpg -colorspace RGB -thumbnail 850x550> /var/www/html/app/tmp/images/test.jpg
tried your line of code and it didnt work either. i installed wget earlier today and it didnt seem to help...

Re: i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-06T13:24:35-07:00
by Bonzo
Oh well so much for those ideas !

Re: i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-06T20:46:56-07:00
by anthony
Are you doing this from PHP? Remember PHP run from the web often runs as a different user and in a different environment. If the convert command or wget is not found on the command path, then it will not work. Take a step back and try to see if you can get just convert to work with a local file. Add 2>&1 to see the errors. There was another post about that recently.

does

Code: Select all

wget http://www.thisisvlad.com/gallery/albums/NYC/Guggenheim_7_001.sized.jpg
download the image? Is there any other errors?

What command does work?

Re: i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-07T15:58:07-07:00
by thisisvlad
anthony wrote:Are you doing this from PHP? Remember PHP run from the web often runs as a different user and in a different environment. If the convert command or wget is not found on the command path, then it will not work. Take a step back and try to see if you can get just convert to work with a local file. Add 2>&1 to see the errors. There was another post about that recently.

does

Code: Select all

wget http://www.thisisvlad.com/gallery/albums/NYC/Guggenheim_7_001.sized.jpg
download the image? Is there any other errors?

What command does work?

i am doing it from php, but i've tried it from the command line and have the same issue.

wget seems to work fine too.

hrm.

Re: i can't seem to run imagemagick commands on an image url.

Posted: 2007-09-07T18:22:54-07:00
by anthony
But convert URL image.png
does not work, right... Hang on it

Check the 'delegate.xml' file on your system
You should see a lines
<delegate decode="https" command='"wget" -q -O "%o" "https:%M"' />
Hmmm, prehaps there should also be a line...
<delegate decode="http" command='"wget" -q -O "%o" "http:%M"' />
But my delegates does not have it, and it works fine on my system.
Maybe there is a build in web get coder....
YEAP I have a coder/html.so file, so IM does direct web get itself. Do you?
Try adding the suggested delegate line to your system delegate.xml OR create a $HOME/magick/delegate.xml of the same style as the system one.
The above delegates entry would be a good fallback, in case the coder module is missing. You could ask Cristy to add it for the next beta release.

Enteries could be added for 'curl' program and a fallback 'ftp:' entry too.