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

Home » Public Forums » archive » Creating a GIF file from a graphics window in IDL
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: Creating a GIF file from a graphics window in IDL [message #20501 is a reply to message #20399] Thu, 29 June 2000 00:00 Go to previous messageGo to previous message
LC's No-Spam Newsread is currently offline  LC's No-Spam Newsread
Messages: 18
Registered: September 1997
Junior Member
>> I was wondering if anyone knows how to write a GIF or JPEG file in IDL
>> using the image that appears in a window.

yes

b=tvrd()
write_gif,filname,b,r,g,b

Where r,g,b are the component of the current lookup table. I use this
procedure to generate GIF out of graphs for use in HTML. I do not use
one of my graphics window, but the "Z device" so I can control the
lookup table without contention with other X applications, and select
the size in pixels.

set_plot,'z'
device,set_resolution=[500,400]
red=[255,0,0,0,255]
gre=[255,0,0,255,0]
blu=[255,0,255,0,0]
tvlct,red,gre,blu
... plot here
b=tvrd()
write_gif,filname,b,red,gre,blu

If I had to make an "occasional" copy of a graphic window, I'd use
either xv or xwud to grab it (as GIF or as X window dump)

--
------------------------------------------------------------ ----------
nospam@ifctr.mi.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: problem with IDL statistics
Next Topic: Sort and Where

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

Current Time: Fri Oct 10 05:37:30 PDT 2025

Total time taken to generate the page: 1.44466 seconds