Re: The usage of PS_END [message #62784 is a reply to message #62783] |
Mon, 06 October 2008 13:32   |
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
|
|
|