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

Home » Public Forums » archive » Re: The usage of PS_END
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: The usage of PS_END [message #62783 is a reply to message #62782] Mon, 06 October 2008 14:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
duxiyu@gmail.com writes:

> I have found the reason that made PS_END not to covert PS file to
> another type file.
> Because my file path contains a space like 'C:\My Documents'.
>
> The string 'cmd' in PS_END is 'convert -density 300 D:\My Documents
> \lineplot.ps -resize 25% D:\My Documents\lineplot.png'
> When the command 'SPAWN, cmd' is executed, the windows system cannot
> identify 'My Documents' as a whole directory name.
> So the double quotation marks shouble be added for the filename with
> filepath.
> The cmd become 'convert -density 300 "D:\My Documents\lineplot.ps" -
> resize 25% "D:\My Documents\lineplot.png"'.
>
> Therefore, I change the line 187 in PS_START/PS_END into
> cmd =3D 'convert -density 300 ' + '"' + ps_struct.filename + '"' + ' -
> resize 25% ' + '"' + outfilename + '"'
> And now the command 'PS_END, /png' can create 'lineplot.png'
> successfully.
>
> But I want to konw how to call PS_START with the whole path filename,
> for example:
> ps_start,filename=3D'D:\plot.ps'

Humm. This is a good point. Spaces in file names gave
me so damn much grief when the Windows and first Mac
versions of IDL came out, that I have never--from that
day to this--EVER named a directory with a space in it
on any computer I ever owned. (The definition of an
indelible experience, I guess.)

ITTVIS has produced a function (IDL_VALIDNAME) to let
you know if a string is a valid variable name. Perhaps
someone can write a function that can fix filenames with
spaces inside them. (I have to leave it as an exercise
for the reader, as I am late for a meeting.)

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Debugging C code called from CALL_EXTERNAL
Next Topic: Re: Debugging C code called from CALL_EXTERNAL

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

Current Time: Wed Oct 08 19:53:33 PDT 2025

Total time taken to generate the page: 0.00437 seconds