Re: Incomplete ouput PNG files. [message #78700 is a reply to message #78699] |
Thu, 15 December 2011 02:16   |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
On 14 déc, 18:26, Mark Piper <mpi...@ittvis.com> wrote:
> On 12/14/2011 9:43 AM, alx wrote:
>
>> Setting the BUFFER keyword actually solved the problem. I now
>> understand what this keyword is useful to, a long lasting
>> interrogation for me! Thanks Mark.
>> alain.
>
> Cool -- you're welcome! Another idea: since there's overhead in
> creating/destroying NG windows, it may help to use the SetData method
> for batching a series of plots:
>
> data = list(of_images)
> p = image(data[0], /buffer)
> p.save, 'image0.png'
>
> for i=1, data.count()-1 do begin
> p.setdata, data[i]
> p.save, 'image' + strtrim(i,2) + '.png'
> endfor
>
> p.close
>
> mp
Using setdata/getdata would be efficient. But most of the overhead, in
my case, is due to the computing/writing on disk of the PNG file (i.e.
"p.save").
alx.
|
|
|