|
Re: Locating ImageMagick on a linux fedora [message #94625 is a reply to message #94621] |
Wed, 26 July 2017 07:24   |
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 #94628 is a reply to message #94626] |
Thu, 27 July 2017 11:53   |
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 #94635 is a reply to message #94630] |
Mon, 31 July 2017 07:45   |
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 #94657 is a reply to message #94638] |
Mon, 07 August 2017 01:42  |
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
|
|
|