Re: SPAWN and IMAGEMAGICK [message #33276] |
Tue, 17 December 2002 09:57 |
mchinand
Messages: 66 Registered: September 1996
|
Member |
|
|
In article <3DFF619F.2030506@giub.unibe.ch>,
David Oesch <oesch@giub.unibe.ch> wrote:
> Hy cracks..
> I'm using IDL5.5 under LINUX REDHAT 7.2 (we got not yet IDL5.6..but Xmas
> is coming) and I'm confronted witha pretty strange thing...
> If I call the Imagemagick tool mogrify using SPAWN like this in IDL
>
> SPAWN, 'mogrify -geometry 45% /home/mydir/pic.jpg '
>
> everything works fine...BUT if I'm using the same call in an IDL batch
> file, which is started by a crontab job ( also running in background),
> this imagemagick command will not be executed.. I also tried
> command='mogrify -geometry 45% /home/mydir/pic.jpg &'
> print,command
> SPAWN,command,/SH
>
> and also
>
> SPAWN,['mogrify -geometry 45% ','' /home/mydir/pic.jpg'],/NOSHELL,
>
> but no gain...only pain
>
> any idea? would be a nice Xmas present...
>
> Cheers
> Dave
>
Your PATH might not be set correctly when using the batch file. Try
either specifying the full path to mogrify or in addition to your
print,command statement add:
spawn, 'which '+command, output
to see if it can find mogrify
--Mike
--
Michael Chinander
m-chinander@uchicago.edu
Department of Radiology
University of Chicago
|
|
|
Re: SPAWN and IMAGEMAGICK [message #33277 is a reply to message #33276] |
Tue, 17 December 2002 09:49  |
Bruce Bowler
Messages: 128 Registered: September 1998
|
Senior Member |
|
|
On Tue, 17 Dec 2002 12:40:47 -0500, David Oesch put fingers to keyboard
and said:
> Hy cracks..
> I'm using IDL5.5 under LINUX REDHAT 7.2 (we got not yet IDL5.6..but Xmas
> is coming) and I'm confronted witha pretty strange thing... If I call
> the Imagemagick tool mogrify using SPAWN like this in IDL
>
> SPAWN, 'mogrify -geometry 45% /home/mydir/pic.jpg '
>
> everything works fine...BUT if I'm using the same call in an IDL batch
> file, which is started by a crontab job ( also running in background),
> this imagemagick command will not be executed.. I also tried
> command='mogrify -geometry 45% /home/mydir/pic.jpg &'
> print,command
> SPAWN,command,/SH
>
> and also
>
> SPAWN,['mogrify -geometry 45% ','' /home/mydir/pic.jpg'],/NOSHELL,
>
> but no gain...only pain
>
> any idea? would be a nice Xmas present...
SWAG, as I'm not that familiar with mogrify and only slightly more
familiar with ImageMagick, but it wouldn't surprize me if mogrify needs a
display to connect to, even if it doesn't use it, and that display is
available in the first case and not available in the second...
Bruce
--
+-------------------+--------------------------------------- ------------+
Bruce Bowler | For every complex problem there is a simple
1.207.633.9600 | solution - that won't work. - H. L. Mencken
bbowler@bigelow.org |
+-------------------+--------------------------------------- ------------+
|
|
|