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 #62784 is a reply to message #62783] Mon, 06 October 2008 13:32 Go to previous messageGo to previous message
duxiyu@gmail.com is currently offline  duxiyu@gmail.com
Messages: 88
Registered: March 2007
Member
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 = '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='D:\plot.ps'


Du


On Oct 4, 1:42 pm, "dux...@gmail.com" <dux...@gmail.com> wrote:
> Hi, all.
>
> PS_START/PS_END is a very useful program in Coyote Program Library.
> But I have some troubles to use PS_END to convert ps file to another
> type.
>
> I have installed ImageMagick and the command COVERT is avaible when I
> test it in system.
> My OS is vista and the version of IDL is 7.0.
>
> However, I cannot repeat the example which is given in David's
> website.
> ;----------------------------------------------------------- ----------------------------------
>   PS_Start, FILENAME='lineplot.ps'
>   Plot, Findgen(11), COLOR=FSC_Color('navy'), /NODATA, XTITLE='Time',
> YTITLE='Signal'
>   OPlot, Findgen(11), COLOR=FSC_Color('indian red')
>   OPlot, Findgen(11), COLOR=FSC_Color('olive'), PSYM=2
>   PS_End, /PNG
> ;----------------------------------------------------------- ----------------------------------
> After I excuted them, there was no problem about the PS file
> 'lineplot.ps', but the PNG file was not created.
>
> Best wished,
> Du
[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: Fri Oct 10 04:57:45 PDT 2025

Total time taken to generate the page: 1.76491 seconds