comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to directly write figure to png without open x-window in IDL5.4?
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: How to directly write figure to png without open x-window in IDL5.4? [message #32839 is a reply to message #32837] Wed, 13 November 2002 13:38 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ninghai Sun (ninghai@whidc.com) writes:

> Now, I first write to PS and then convert to png in cronjob. No
> problem in linux. But if logout of Linux when the idl code is running,
> always get error that no x-window is opened. Any idea how to figure it
> out?

Use the Z-buffer for a window.

thisDevice = !D.Name
Set_Plot, 'Z'
LOADCT, 5 ; of whatever you do to load colors
TVLCT, r, g, b, /GET
Device, Z_Buffer=0, Set_Resolution=[400, 300] ; or whatever
TV, image ; Or, whatever graphics you display
snapshot = TVRD()
Set_Plot, thisDevice
Write_PNG, 'myfile.png, snapshot, r, g, b

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: How to directly write figure to png without open x-window in IDL5.4?
Next Topic: Martin's Library is Back!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 14:53:51 PST 2025

Total time taken to generate the page: 0.09764 seconds