Imagemagick on a webhost

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

Post by anthony »

They probably meant /usr/bin/mogrify
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Also wget get is itself a command. However IM will call wget get if the image it has is a URL. Though "mogrify" would have trouble saving back to a URL :-)

You may need some semi-colons between commands!

At the moment your first command make no sense, and I can't even tell what they are doing.

As for the second mogrify works on a EXISTING image. That is not the case here. Also the URL is not to a image, bt a HTML web page, IM will not reconise it.

try this...

Code: Select all

/usr/bin/convert http://www.cit.gu.edu.au/~anthony/graphics/imagick6/images/logo.gif  IM_Examples_Logo.gif
That should work fine!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

IM can't directly convert HTML into a image. Unless it knows about some other program to do it, and that is what it is calling. Hmmm
Looking in /usr/lib/ImageMagick-6.2.8/config/delegates.xml
<delegate decode="htm" command='"html2ps" -U -o "%o" "%i"' />
<delegate decode="html" command='"html2ps" -U -o "%o" "%i"' />

This means that if html2ps is installed the it will convert the web page into an image (via Postscript).

An aturantive is to display the page in a firefox browser window (in a virtual X window display), then grab (import) the displayed window as an image. I saved a copy of a program that does this at..
http://www.cit.gu.edu.au/~anthony/graph ... t_webpages
I have to tried this, though I did look over the code, so no gurantees.
However I doubt that your web server provider would like you running this on their server, even if they provided all the required programs.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply