sorry be noob, i try to execute a fred imagemagick script

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
kerry

sorry be noob, i try to execute a fred imagemagick script

Post by kerry »

hi,

I discover the availables functions with image magick and i have downloaded a freds image magik script on MAC OS X 10.6 but when i call him via a shell window it answer to that the command isn't found. I know that image magick is well running on my Mac because when i use the convert ... option that make the result that i want . Is existing a keyword after convert command for execute an image magick script??? i'm lost , could you help me please... :shock: :shock:
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: sorry be noob, i try to execute a fred imagemagick scrip

Post by Bonzo »

Freds scripts are bash scripts and need to be run a different way. I would search for how to run them; I did a quick search and found that you need to run them from Mac's terminal window and:
The file has to be executable. Let’s say it’s called myscript.sh. Here’s how you’d make it executable:

chmod +x myscript.sh

Then, if you want to run it from the same directory that you’re in, you have to specify the current directory, like this:

./myscript.sh
So looking at Freds 3Dtext example I guess you would need something like:

Code: Select all

3Dtext -t "some text" -f fontname -p 72 -d northwest 
kerry

Re: sorry be noob, i try to execute a fred imagemagick scrip

Post by kerry »

yes but when i try to call the command 3DText with options and associated script the bash answer me "command not found"
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: sorry be noob, i try to execute a fred imagemagick scrip

Post by fmw42 »

what version of IM are you on? How did you install it? From binary, from source? If the latter, did you use MacPorts or FINK?

Did you set your PATH to know where IM is located. If you installed from source it should be in /usr/local/bin

cd /usr/local/bin
ls

see if that directory contains convert, mogrify, montage, etc?

If not try

find /usr | grep "convert"

and see where it is located.

You might also get some clues to where IM is located by

convert -list configure


On my Mac OSX Tiger, I have set my PATH in the .profile (hidden) file. My .profile file has set the PATH to contain /usr/local/bin and also the path to where I keep my scripts. The latter is not necessary, but then to run the script you need to provide "bash" and the path to the script and potentially to your images in your terminal window.

For example:

bash pathto/3Dtext ... arguments ... pathto/outputimage


Here is what my .profile looks like, but yours may need to be different if you installed using MacPorts or FINK


##
# DELUXE-USR-LOCAL-BIN-INSERT
# (do not remove this comment)
##
echo $PATH | grep -q -s "/usr/local/bin"
if [ $? -eq 1 ] ; then
PATH=$PATH:/usr/local/bin
export PATH
fi
export PATH="${PATH}:/Users/fred/Applications/ImageMagick-Scripts/bin"
export DISPLAY=:0


I used BBEdit (text editor) as it lets me get to hidden files such as .profile.

Let me know your exact command.

This topic that I wrote may also be of some help although it was done with Tiger. see viewtopic.php?f=1&t=10442

Fred
Post Reply