Re: Incomplete ouput PNG files. [message #78708 is a reply to message #78707] |
Wed, 14 December 2011 08:22   |
Mark Piper
Messages: 198 Registered: December 2009
|
Senior Member |
|
|
On 12/14/2011 8:33 AM, alx wrote:
> I recently wanted to process a large number of data files in order to
> produce the corresponding number of output image files, each in PNG
> format. I choose to use NG graphics, since the sequence: "p =
> image(some_data)& p.save('this_image.png')& p.close", appears pretty
> well suitable for this purpose. No problem in coding the corresponding
> IDL 8.1 project on my (Windows) workstation, and running it on a few
> test files. Since the data files were stored on a remote (Windows)
> server, I decided to run the project directly on the server, through a
> remote connection from my workstation to the server, by using Terminal
> Server. Still no problem: the job was running perfectly, and I could
> remotely see each graphic window being open, then the corresponding
> PNG file created, etc...
> Now, to avoid any flashing on my screen, I just MINIMIZED the TS
> window which was open on my workstation (no logout, no disconnect from
> the remote server), the remote job continuing to run unattended.
> Patatras ! From this point the PNG files were created but also harshly
> truncated (basically reduced to a header and a void image).
> I guess (but have not tested) that any other image file format would
> have produced the same unsatisfying result.
> A "true screen" seems then mandatory for having the "graphic.save"
> function to work correctly: is it a bug of NG graphics or a feature?
> Have some unix/linux people got same experience when using any X-
> server in this way ?
> alx.
This is a slightly different workflow, but could you please try setting
the BUFFER keyword in your call to IMAGE? E.g.,
p = image(data, /buffer)
p.save, 'this_image.png'
p.close
The graphic will be rendered in an offscreen buffer. I have a hunch that
this may help, since this feels like a tricky (to me, at least) X server
issue.
mp
|
|
|