Page 1 of 1

problem with ImageMagick

Posted: 2017-07-23T14:30:14-07:00
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.

Re: problem with ImageMagick

Posted: 2017-07-23T14:35:56-07:00
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

Re: problem with ImageMagick

Posted: 2017-07-24T02:21:38-07:00
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

Re: problem with ImageMagick

Posted: 2017-07-24T09:09:35-07:00
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

Re: problem with ImageMagick

Posted: 2017-07-24T12:52:04-07:00
by AWG
I am already add it in my .cshrc, but the problem did not solve.

Re: problem with ImageMagick

Posted: 2017-07-24T14:01:49-07:00
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.

Re: problem with ImageMagick

Posted: 2017-07-25T06:31:32-07:00
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.

Re: problem with ImageMagick

Posted: 2017-07-25T07:57:38-07:00
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

Re: problem with ImageMagick

Posted: 2017-07-25T09:37:34-07:00
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

Re: problem with ImageMagick

Posted: 2017-07-25T10:39:31-07:00
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.

Re: problem with ImageMagick

Posted: 2017-07-25T10:42:22-07:00
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$

Re: problem with ImageMagick

Posted: 2017-07-25T10:47:25-07:00
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 ...

Re: problem with ImageMagick

Posted: 2017-07-25T11:08:35-07:00
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.

Re: problem with ImageMagick

Posted: 2017-07-25T11:20:15-07:00
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.

Re: problem with ImageMagick

Posted: 2017-07-26T01:30:35-07:00
by AWG
Thanks for your help, I will tray again