ImageMagick Unix execution path

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
bennettphoto

ImageMagick Unix execution path

Post by bennettphoto »

I'm a Unix neophyte and having problems with using ImageMagick in OS 10.4 and the Bash shell in Terminal. I can only execute "convert" using the full path name to the bin directory.

I don't know if I have correctly set:

export PATH; PATH="$HOME/ImageMagick/bin:$PATH"
export MAGICK_HOME="$HOME/ImageMagick-6.3.2"
export DYLD_LIBRARY_PATH="$HOME/ImageMagick-6.3.2/lib"

My path to ImageMagick is:
/usr/local/src/ImageMagick-6.3.2/

I'd be grateful for some advice as I've spent several days trying to get this software working.

Thank you,

PB
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ImageMagick Unix execution path

Post by anthony »

Try adding /usr/local/src/ImageMagick-6.3.2/ to the 'PATH' environment variable.
That tells BASH where to look for commands that have no '/' in them.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
bennettphoto

Re: ImageMagick Unix execution path

Post by bennettphoto »

Thanks. Now Bash recognizes the "convert" command, though I had to add /bin to your suggestion.

My Bash .profile is now set:

HOME="/usr/local/"

export MAGICK_HOME="/usr/local/src/ImageMagick-6.3.2"
export PATH; PATH="$MAGICK_HOME/bin:$PATH"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/src/ImageMagick-6.3.2/bin"
export PATH

The following command comes up with an error "No such file or directory" for logo1.jpg
convert logo1.jpg -rotate 45 logo2.jpg

I presume that this is a permissions problem. Using Terminal is academic for me I want to use PHP5 and MagickWand for PHP, Next step to install MagickWand. I hope it is not as difficult as this has been!

Thanks for the advice.

B
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ImageMagick Unix execution path

Post by anthony »

More likly the image is not in your current directory. You can add a path to the file name, or change directories to its location.

I suggest you get a book on basic unix, just to give you the concepts you need. The simplist UNIX book should be fine and most libraries should have them.

You could even try a basic UNIX tutorial on the web. There are lots of them!

All in all this is not a IM problem.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply