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

Home » Public Forums » archive » Re: SPAWN and IMAGEMAGICK
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
Re: SPAWN and IMAGEMAGICK [message #33276] Tue, 17 December 2002 09:57
mchinand is currently offline  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 Go to previous message
Bruce Bowler is currently offline  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 |
+-------------------+--------------------------------------- ------------+
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SPAWN and IMAGEMAGICK
Next Topic: Re: dual histogram stumper

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

Current Time: Wed Oct 08 16:49:54 PDT 2025

Total time taken to generate the page: 0.00499 seconds