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

Home » Public Forums » archive » Re: Set path of terminal tools, e.g. ImageMagick, in Workbench
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: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72829] Mon, 11 October 2010 05:44
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wlandsman writes:

> I'm not sure that it is fair to say that you are no longer using
> direct graphics fonts, though. ImageMagick is presumably trying to
> faithfully reproduce the fonts created in your IDL direct graphics
> postscript file

Right. And because of the way PS_Start works, these
are always either PostScript or True-Type fonts.
But never Hershey fonts, which I am happy to use
on the display for "previewing" images before I
create them for their final purpose.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72830 is a reply to message #72829] Mon, 11 October 2010 05:31 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Oct 10, 10:21 pm, David Fanning <n...@dfanning.com> wrote:

> Oh, hang on! After a millisecond after I hit that
> damn Send button I thought I should just check on
> this! :-(
>
> You are right. No PDF files. I've been creating PNG
> files and importing those at high resolution (600 dpi).

Right. I've also been happy using PS_END,/PNG to import figures into
my LaTeX files.

I'm not sure that it is fair to say that you are no longer using
direct graphics fonts, though. ImageMagick is presumably trying to
faithfully reproduce the fonts created in your IDL direct graphics
postscript file. --Wayne
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72831 is a reply to message #72830] Sun, 10 October 2010 20:59 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 10, 11:21 pm, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> Thus, to get a graphical output in *any* format I desire,
>> my code looks like this. I show you PDF output, but I
>> often use PNG, JPEG, or TIFF, depending on what I'm
>> doing and where I want to view the output. Just set
>> the appropriate keyword. ImageMagick does the conversion
>> from PostScript to any of these other formats.
>
>>    IDL> PS_Start
>>    IDL> My_Graphic_Program
>>    IDL> PS_End, /PDF
>
> Oh, hang on! After a millisecond after I hit that
> damn Send button I thought I should just check on
> this! :-(
>
> You are right. No PDF files. I've been creating PNG
> files and importing those at high resolution (600 dpi).

I was wondering what magic was making ImageMagick create vector PDFs.
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72832 is a reply to message #72831] Sun, 10 October 2010 20:57 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 10, 9:56 pm, fov <renoc...@gmail.com> wrote:
> I'm afraid that I do not have .cshrc in ~/. However, "SPAWN, 'echo
> $PATH'" yields very different PATH. Though I can see the differences,
> I'm still in search of Bash profile file when IDLWorkbench.app is
> activating, nor I cannot "SPAWN, 'setenv PATH=***'" which gives
> 'Command not found...'

setenv is a csh command, that is why it does not work there (spawn is
calling a bash). It seems to me that you could just add a line setting
your PATH on your .bashrc file. Something like

export PATH=/opt/local/bin/:$PATH
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72833 is a reply to message #72832] Sun, 10 October 2010 19:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Thus, to get a graphical output in *any* format I desire,
> my code looks like this. I show you PDF output, but I
> often use PNG, JPEG, or TIFF, depending on what I'm
> doing and where I want to view the output. Just set
> the appropriate keyword. ImageMagick does the conversion
> from PostScript to any of these other formats.
>
> IDL> PS_Start
> IDL> My_Graphic_Program
> IDL> PS_End, /PDF

Oh, hang on! After a millisecond after I hit that
damn Send button I thought I should just check on
this! :-(

You are right. No PDF files. I've been creating PNG
files and importing those at high resolution (600 dpi).

Sorry for the confusion. I don't usually get this
excited. ;-)

Cheers,

David

P.S. Let's just say I completely forgot how I was doing
this, since it is so easy to do!


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72834 is a reply to message #72833] Sun, 10 October 2010 19:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wlandsman writes:

> Hmmm, I can't grok these paragraphs. The versions of PS_START and
> PS_END on your website are for direct graphics and use direct graphics
> fonts. PS_END does not have an option to create a PDF file. Are
> you saying that you have versions of PS_START and PS_END for use with
> the new (V8.0) graphics?

No, no. I'm not interested in new graphics. (Well,
maybe I will be when they actually work.) I am
talking *strictly* direct graphics here.

I have absolutely given up my quest for decent fonts
in IDL *old* direct graphics because I don't need them
any more!

All of the graphics routines I write work on the display
and in the PostScript device in identical ways. (Teaching
people how to do this has been my religious practice for
nearly 20 years now.)

Thus, to get a graphical output in *any* format I desire,
my code looks like this. I show you PDF output, but I
often use PNG, JPEG, or TIFF, depending on what I'm
doing and where I want to view the output. Just set
the appropriate keyword. ImageMagick does the conversion
from PostScript to any of these other formats.

IDL> PS_Start
IDL> My_Graphic_Program
IDL> PS_End, /PDF

It honestly is that dead simple once you have ImageMagick
installed. I'm making PDF files that I import into
Framemaker. All my book graphics are of this type.
Every graphic I produce has beautiful PostScript or
True-Type fonts.

It's wonderful! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72835 is a reply to message #72834] Sun, 10 October 2010 18:35 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Oct 9, 8:48 pm, David Fanning <n...@dfanning.com> wrote:
> But since you mention ImageMagick I just wanted to say
> that Friday, after several weeks of producing more than
> 50 book figures, I suddenly realized that I don't miss
> lousy direct graphics fonts any more at all!
>
> I use a version of PS_Start to create the book
> figures. I call PS_Start, paste the code from the
> book into the IDL command line, and then use PS_End
> to make a PDF file. Then I just import the PDF
> file into the book as a figure.
>

Hmmm, I can't grok these paragraphs. The versions of PS_START and
PS_END on your website are for direct graphics and use direct graphics
fonts. PS_END does not have an option to create a PDF file. Are
you saying that you have versions of PS_START and PS_END for use with
the new (V8.0) graphics? --Wayne
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72836 is a reply to message #72835] Sun, 10 October 2010 17:56 Go to previous message
Reno is currently offline  Reno
Messages: 7
Registered: November 2005
Junior Member
Hi Paulo,

> Do you get the same if you start the Workbench from the command line
> (idlde) or from some icon/menu?

Haven't I thought of it!? Running IDLDE from terminal, opposed to
clicking the IDLWorkbench.app, did make differences - Now, I can
successfully collaborate with ImageMagick.

> Maybe PATH is being set to include ImageMagick's directory in a .cshrc
> file? The error above indicates that IDL is spawning bash.
>
> Anyway, you could spawn 'echo $PATH', to find out how it differs from
> the PATH in your terminal, it might give clues to where the difference
> originates.

I'm afraid that I do not have .cshrc in ~/. However, "SPAWN, 'echo
$PATH'" yields very different PATH. Though I can see the differences,
I'm still in search of Bash profile file when IDLWorkbench.app is
activating, nor I cannot "SPAWN, 'setenv PATH=***'" which gives
'Command not found...'

For the time being I shall have to run the IDLDE from terminal. Thanks
for the tip.

Cheers,
Reno
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72840 is a reply to message #72836] Sun, 10 October 2010 14:12 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Oct 9, 6:30 pm, fov <renoc...@gmail.com> wrote:
> It implies that the whatever terminal environment operating through
> IDL Workbench is not the same as the one running in real terminal.

Do you get the same if you start the Workbench from the command line
(idlde) or from some icon/menu?

Maybe PATH is being set to include ImageMagick's directory in a .cshrc
file? The error above indicates that IDL is spawning bash.

Anyway, you could spawn 'echo $PATH', to find out how it differs from
the PATH in your terminal, it might give clues to where the difference
originates.
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72841 is a reply to message #72840] Sun, 10 October 2010 13:37 Go to previous message
Reno is currently offline  Reno
Messages: 7
Registered: November 2005
Junior Member
Hi David,

> I don't know how to solve this problem. Sorry, but
> I don't have a Mac.

I presume that it may be OSX specific problem, and other platform
doesn't have such issue.

> ...
> Not only do I know that the code is typo free, but
> this method produces absolutely perfect output with
> PostScript or True-Type fonts, whatever I want. The
> figures print great, and look spectacular in a PDF
> version of the book. I really couldn't be happier.
>
> I could probably live without IDL. But I'm pretty
> sure I couldn't live without ImageMagick. :-)

This is exactily what I would like to achieve. I have excellent
results with the same method in terminal environment (with help of
ImageMagick), and I hope to do it in Workbench as well to make my life
easier.

I seems that I should contact ITTVIS guys for the help. Meanwhile,
it'd be grateful if any Mac users are experiencing the same problem as
mine.

Cheers,
Reno
Re: Set path of terminal tools, e.g. ImageMagick, in Workbench [message #72843 is a reply to message #72841] Sat, 09 October 2010 17:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Reno writes:

> I'm trying to use Unix tools, in IDL Workbench, e.g. use ImageMagick
> via David's PS_START and PS_END. It turns out that the SPAWN does not
> recognise the tools, like,
>
> IDL> SPAWN, 'convert -version'
> bash: convert: command not found
>
> I installed the ImageMagick through MacPorts and it's in /opt/local/
> bin, but I don't think the location doesn't really matter since the
> tools are properly set its path. When I run the same code in IDL in
> terminal environment, it is just perfect with not problem what so
> ever.
>
> When I give full path of ImageMagick, it works fine.

I don't know how to solve this problem. Sorry, but
I don't have a Mac.

But since you mention ImageMagick I just wanted to say
that Friday, after several weeks of producing more than
50 book figures, I suddenly realized that I don't miss
lousy direct graphics fonts any more at all!

I use a version of PS_Start to create the book
figures. I call PS_Start, paste the code from the
book into the IDL command line, and then use PS_End
to make a PDF file. Then I just import the PDF
file into the book as a figure.

Not only do I know that the code is typo free, but
this method produces absolutely perfect output with
PostScript or True-Type fonts, whatever I want. The
figures print great, and look spectacular in a PDF
version of the book. I really couldn't be happier.

I could probably live without IDL. But I'm pretty
sure I couldn't live without ImageMagick. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Set path of terminal tools, e.g. ImageMagick, in Workbench
Next Topic: Histogram

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

Current Time: Wed Oct 08 17:25:51 PDT 2025

Total time taken to generate the page: 0.00486 seconds