Re: The usage of PS_END [message #62779 is a reply to message #62778] |
Mon, 06 October 2008 21:54   |
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'
Well, this turned out to be partly my fault, sorry. :-(
PSConfig was written so that you had to pass it a filename and a
directory name. Of course, no one does, probably. They just pass
it a filename that has directories appended to the name. So, I if you
did to that, I was appending something else on to the front of that,
and ... well, it was ugly. So that is fixed.
Then, I just fixed PS_END so the command that I am going to SPAWN
will accept filenames with spaces in them.
You can get all the files you need (assuming you following my
advice this morning and downloaded a new copy of the Coyote
Library), by downloading and installing this file over the top
of your Coyote Library files:
http://www.dfanning.com/programs/psconfig.zip
Sorry for the mix-up. It seems if I make one small change in this
library, I have to fix 50. Weird.
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.")
|
|
|