problem with ImageMagick

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
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

problem with ImageMagick

Post by AWG »

Hi everyone,

I install ImageMagick is in my path, /usr/bin and /usr/local/bin, but the problem is when I run idl and want to convert ps image to png, it tell me
ImageMagick is not installed on your computer.

I want help.
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: problem with ImageMagick

Post by Bonzo »

What is your exact code and version?

Try /usr/bin/convert or /usr/local/bin/convert instead of just convert

You can try finding it with type convert or which convert
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

does not work
;.....................................
A.S> which convert
/bin/convert
;....................................
under bash shell if I type
export PATH=/opt/local/bin/:$PATH
it works normally, but with csh shell following command does not work

setnv PATH /opt/local/bin/:$PATH
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with ImageMagick

Post by fmw42 »

Code: Select all

setnv PATH /opt/local/bin/:$PATH
should that not be

Code: Select all

setenv PATH /opt/local/bin/:$PATH
e is missing between set and nv

I do not use csh shell but I think you need to do that in the .cshrc file. See https://www.ibm.com/support/knowledgece ... v_vars.htm
https://www.ccs.uky.edu/docs/cluster/env.html
https://unix.stackexchange.com/question ... -hat-linux
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

I am already add it in my .cshrc, but the problem did not solve.
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with ImageMagick

Post by fmw42 »

If you believe that IM is installed in /opt/local/bin, then try a simple command in your shell such as

Code: Select all

/opt/local/bin/convert logo: logo.gif
does that work?

Are you on IM 7 or IM 6. Exactly what version of IM are you using and on what platform? If on IM 7, then replace convert with magick.
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

If i type
/opt/local/bin/magick logo: logo.gif
command not found.
but if I type
A.S> where magick
/usr/local/bin/magick
A.S> /usr/local/bin/convert logo: logo.gif
A.S> /usr/local/bin/magick logo: logo.gif

image logo.gif appears in directory.
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-12-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with ImageMagick

Post by fmw42 »

So your ImageMagick is not installed where you thought. So change your setenv

setenv PATH /usr/local/bin/:$PATH

If the command magick works then you also have a version of ImageMagick 7 installed. I think you need to find which version of ImageMagick you have on your system and where.

What do you get from each of these?

Code: Select all

convert -version

magick -version

/usr/local/bin/convert -version

/usr/local/bin/magick -version

/usr/bin/convert -version

/usr/bin/magick -version

/opt/local/bin/convert -version

/opt/local/bin/magick -version
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

I write

setenv PATH /usr/local/bin/:$PATH

but the problem did not solve.

What do you get from each of these?

A.S> convert -version
Version: ImageMagick 7.0.6-1 Q16 x86_64 2017-07-20 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib djvu fontconfig freetype jng jpeg lcms lzma openexr pangocairo png tiff webp wmf x xml zlib
;*********************************
A.S> magick -version
Version: ImageMagick 7.0.6-1 Q16 x86_64 2017-07-20 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib djvu fontconfig freetype jng jpeg lcms lzma openexr pangocairo png tiff webp wmf x xml zlib
;*******************************
A.S> /usr/local/bin/convert -version
Version: ImageMagick 7.0.6-1 Q16 x86_64 2017-07-20 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib djvu fontconfig freetype jng jpeg lcms lzma openexr pangocairo png tiff webp wmf x xml zlib
***********************************
A.S> /usr/local/bin/magick -version
Version: ImageMagick 7.0.6-1 Q16 x86_64 2017-07-20 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP
Delegates (built-in): bzlib djvu fontconfig freetype jng jpeg lcms lzma openexr pangocairo png tiff webp wmf x xml zlib
**********************************
A.S> /usr/bin/convert -version
Version: ImageMagick 6.9.2-7 Q16 x86_64 2015-12-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib
***********************************
A.S> /usr/bin/magick -version
/usr/bin/magick: Command not found.
**************************************
A.S> /opt/local/bin/convert -version
/opt/local/bin/convert: Command not found.
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

For illustration, my problem with imagmagick with idl is

IDL> cgPS2Raster, 'IQUVS.ps', /JPEG
% Compiled module: CGPS2RASTER.
% Compiled module: SETDEFAULTVALUE.
% Compiled module: CGROOTNAME.
% Compiled module: PATH_SEP.
% Compiled module: STRSPLIT.
% Compiled module: FILEPATH.
% Compiled module: CGHASIMAGEMAGICK.
% Compiled module: CGERRORMSG.

Traceback Report from CGPS2RASTER:

% CGPS2RASTER: ImageMagick cannot be found on this machine.
% Execution halted at: CGPS2RASTER 416 /coyote/cgps2raster.pro
% $MAIN$
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with ImageMagick

Post by fmw42 »

You have two version of imagemagick installed. IM 7 at /usr/local/bin and IM 6 at /usr/bin. IM is not installed at /opt/local/bin

I do not work with csh shell, so cannot tell you how to set that environment variable if that fails. But you can put the full path to magick or convert in your commands in your shell script and that should work.

Code: Select all

/usr/local/bin/magick ...

or

/usr/bin/convert ...
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

in . cshrc, I define paths of all other programs using setenve, but with IM I have a problem or the problem with CGPS2RASTER.pro prog.
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem with ImageMagick

Post by fmw42 »

Sorry, I do not know CGPS2RASTER.pro program. I wish I could help more, but it is now out of my range of knowledge.

You could try adding your setenv command at the top of your script and see if that works.
AWG
Posts: 9
Joined: 2017-07-23T14:22:11-07:00
Authentication code: 1151
Contact:

Re: problem with ImageMagick

Post by AWG »

Thanks for your help, I will tray again
Medicaments de qualite www.viagrasansordonnancefr.com les soins aux patients
Post Reply