comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Locating ImageMagick on a linux fedora
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Locating ImageMagick on a linux fedora [message #94621] Wed, 26 July 2017 02:46 Go to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?
Re: Locating ImageMagick on a linux fedora [message #94625 is a reply to message #94621] Wed, 26 July 2017 07:24 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
the program cghasimagemagick.pro tests whether imagemagick is present with the following code:
*****************
; Assume failure.
retval = 0

; To search for ImageMagick, I am going to spawn a call to convert.
; If the error_result is a null string, I assume this command worked.
; Otherwise, it didn't find ImageMagick.
; Spawn, 'convert -version', result, error_result
;
; If nothing is put in the error result, then we are good to go.
IF error_result[0] EQ "" THEN retval = 1
********************

From the Linux prompt what do you get for

%convert -version

From the IDL prompt what do you get for

IDL> print,cghasimagemagick()
;
On Wednesday, July 26, 2017 at 5:46:47 AM UTC-4, AGW wrote:
> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?
Re: Locating ImageMagick on a linux fedora [message #94626 is a reply to message #94621] Thu, 27 July 2017 05:42 Go to previous messageGo to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?

A.S> convert -version
Version: ImageMagick 7.0.6-1 Q16 x86_64 2017-07-15 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig fpx freetype gslib jng jpeg lcms ltdl lzma pangocairo png ps tiff webp wmf x xml zlib

............................
IDL> print,cghasimagemagick()
% Compiled module: CGHASIMAGEMAGICK.
0
Re: Locating ImageMagick on a linux fedora [message #94628 is a reply to message #94626] Thu, 27 July 2017 11:53 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
What do you get at the IDL prompt when you type

IDL> spawn, 'convert -version', result, error_result
IDL> print,error_result

It is possible that the latest version of ImageMagick and Fedora are giving some output in the error_result variable, rather than an empty string. (There are versions of ImageMagick on the Mac that do this.) In any case I would just change the second last line in cghasimagemagick.pro so it reads

RETURN, 1

instead of

RETURN, retval

On Thursday, July 27, 2017 at 8:42:07 AM UTC-4, AGW wrote:
> On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
>> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?
>
> A.S> convert -version
> Version: ImageMagick 7.0.6-1 Q16 x86_64 2017-07-15 http://www.imagemagick.org
> Copyright: © 1999-2017 ImageMagick Studio LLC
> License: http://www.imagemagick.org/script/license.php
> Features: Cipher DPC HDRI Modules OpenMP
> Delegates (built-in): bzlib cairo djvu fftw fontconfig fpx freetype gslib jng jpeg lcms ltdl lzma pangocairo png ps tiff webp wmf x xml zlib
>
> ............................
> IDL> print,cghasimagemagick()
> % Compiled module: CGHASIMAGEMAGICK.
> 0
Re: Locating ImageMagick on a linux fedora [message #94629 is a reply to message #94621] Fri, 28 July 2017 12:02 Go to previous messageGo to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?

after do it appears

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:

% STRTOK: Variable is undefined: STRINGIN.
% Execution halted at: STRSPLIT 32 /usr/local/itt/idl706/lib/strsplit.pro
% CGPS2RASTER 304 /home/agamal/IDL/libraries/coyote/cgps2raster.pro
% $MAIN$
Re: Locating ImageMagick on a linux fedora [message #94630 is a reply to message #94621] Fri, 28 July 2017 14:42 Go to previous messageGo to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?

IDL> spawn, 'convert -version', result, error_result
IDL> print,error_result
tset: standard error: Inappropriate ioctl for device
Re: Locating ImageMagick on a linux fedora [message #94633 is a reply to message #94621] Mon, 31 July 2017 02:12 Go to previous messageGo to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?

any help
Re: Locating ImageMagick on a linux fedora [message #94635 is a reply to message #94630] Mon, 31 July 2017 07:45 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Friday, July 28, 2017 at 5:43:01 PM UTC-4, AGW wrote:
> On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
>> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?
>
> IDL> spawn, 'convert -version', result, error_result
> IDL> print,error_result
> tset: standard error: Inappropriate ioctl for device

That looks like a serious error . Did you ever test whether ImageMagick is working (outside of IDL)? If you have a postscript file idl.ps, can you convert it to another format (at the Linux prompt)?

%convert idl.ps idl.png

I assume are able to get the Coyote IDL program to work if you only want postscript files. If you can't get ImageMagick working, then you could create postscript files and use another Linux utility (google it) to convert them to your desired format.
Re: Locating ImageMagick on a linux fedora [message #94638 is a reply to message #94621] Mon, 31 July 2017 13:09 Go to previous messageGo to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?

hi, thanks for your help

ImageMagick work correctly and I tested it as

> magick 4pic.ps 4pic.png
OR
> convert 4pic.ps 4pic.png
............
I am already want postscript files to my research, but sometimes I need to convert it to other formats.
Re: Locating ImageMagick on a linux fedora [message #94657 is a reply to message #94638] Mon, 07 August 2017 01:42 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Monday, July 31, 2017 at 10:09:32 PM UTC+2, AGW wrote:
> On Wednesday, July 26, 2017 at 11:46:47 AM UTC+2, AGW wrote:
>> I have installed ImageMagick on my computer but the Coyote Graphics commands can't seem to find it. What do I need to do make it available to them?
>
> hi, thanks for your help
>
> ImageMagick work correctly and I tested it as
>
>> magick 4pic.ps 4pic.png
> OR
>> convert 4pic.ps 4pic.png
> ............
> I am already want postscript files to my research, but sometimes I need to convert it to other formats.

Hi,
just my 2 cents. David's use of ImageMagick basically makes use of the spawn command. The code first generates a .ps and then converts accordingly. My recommendation is to first test if the above commands (like "magick 4pic.ps 4pic.png") also work from IDL:
spawn, "magick 4pic.ps 4pic.png"
You might have to fix the paths in the IDL command or go to the proper directory before (CD, "myDir").

If the IDL spawn command behaves as from the linux command line, then I would recommend to:
1) use Coyote's pros to generate a PS output
2) convert yourself with the spawn command

Now, my guess is that spawn of the same command won't work. But I'm guessing so I should stop here...

Cheers,
Helder
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: create widget_label on the frame line
Next Topic: a little tip for reading modis data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:16:43 PDT 2025

Total time taken to generate the page: 0.00618 seconds