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

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
thisisvlad

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

Post 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?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

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

Post 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
thisisvlad

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

Post 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...
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

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

Post by Bonzo »

Oh well so much for those ideas !
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
thisisvlad

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

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply