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

Home » Public Forums » archive » Re: How to make GIF file (2) ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to make GIF file (2) ? [message #4524] Tue, 13 June 1995 00:00
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
bleau@UMDSP.UMD.EDU (Lawrence Bleau) writes:

> Hi again. I posted a message last week re generating a GIF file from IDL so I
> can serve it over WWW, and received quite a few responses so far. All of them
> have directed me to use TVRD and WRITE_GIF. Thanks to those who responded.
> This does not, however, solve my problem entirely. Here are the additional
> details.

> I had learned about TVRD and WRITE_GIF from TFM before I posted my initial
> message, and had hoped there was a better way of approaching the problem (like
> with a PLOT option). I put up a simple plot and called TVRD(0,0,100,100,0),
> followed by a WRITE_GIF. I moved the resultant file to my WWW server
> directory, went to my Mac, fired up Netscape, and viewed the image. It was a
> small square image in the corner of the graph, showing the axes. So far, so
> good. I next called TVRD(0,0,200,200,0) and put it in another file. This
> displayed a rectangular image with some lines, but was not recognizable as part
> of the graph (well, maybe if you strain). The rectangle was roughly twice the
> width of the first subimage and half the height, though I wouldn't swear to it
> (I didn't measure it). Finally, I tried it with TVRD(0,0,500,500,0), and when
> viewed this produced a *blank* image! There's something going on here I do not
> understand, folks, and it puts a big question mark beside the entire process.

(rest deleted)

As I recall, if you use TVRD() without any parameters, it automatically reads
in the entire window. I suspect that's what you want to do. If you use the
'Z' device, as mentioned in other posts, then you can use the command

IDL> DEVICE,SET_RESOLUTION=[xsize,ysize]

to make the size of the pseudo-display the desired size of the GIF file before
doing any plotting.

Bill Thompson
Re: How to make GIF file (2) ? [message #4527 is a reply to message #4524] Mon, 12 June 1995 00:00 Go to previous message
bleau is currently offline  bleau
Messages: 24
Registered: November 1993
Junior Member
Sorry, folks. I just read a few more messages and realized you'd answered my
questions. The answer being:

SET_PLOT,'Z'
PLOT,X,Y
A=TVRD()
WRITE_FILE,'A.GIF',A

This will plot values in Y against values in X and write them out in GIF
format. I just tried it in a batch job, and it works nicely. Success!

Thanks to everyone who responded about using Z buffer, especially Robert M.
Candey (Robert.M.Candey@gsfc.nasa.gov), Mark Rivers
(rivers@cars3.uchicago.edu), Jason Mathews (mathews@bolero.gsfc.nasa.gov),
and H. Ian Novack (ian@gomez.jpl.nasa.gov).

Larry Bleau
University of Maryland
bleau@umdsp.umd.edu
301-405-6223
Re: How to make GIF file (2) ? [message #4529 is a reply to message #4527] Mon, 12 June 1995 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <3ri3c2$dm6@hecate.umd.edu>, bleau@UMDSP.UMD.EDU (Lawrence Bleau) writes:
> Hi again. I posted a message last week re generating a GIF file from IDL so I
> can serve it over WWW, and received quite a few responses so far. All of them
> have directed me to use TVRD and WRITE_GIF. Thanks to those who responded.
> This does not, however, solve my problem entirely. Here are the additional
> details.
...
> The second problem is one of automation. As I mentioned earlier I want these
> graphs to be served out over WWW. What I didn't mention in my earlier post was
> the method I had in mind. I'd like these graphs to be generated when a WWW
> request comes in for data in a certain time frame. My HTTP server would fire
> up an application which would figure out what raw data files are needed, then
> start up IDL and feed it the data. IDL would generate a GIF file, which the
> application would then feed back to the HTTP server and thence to the WWW
> client. So, IDL would be running in a detached mode, with *no* display device.
>
> Question: Can TVRD get information from the display device if there is no
> display device?
>
> Also: Can PLOT be made to generate a plot (which TVRD can access) if there is
> no display device? I know PLOT can be told to generate a PostScript file (do a
> SET_PLOT,'PS'), but this doesn't help, as Netscape doesn't know how to display
> PostScript. Ideally, I'd like to do the equivalent of SET_PLOT,'GIF', but that
> doesn't appear to be an option. If the PLOT-TVRD combination doesn't work in
> this mode, what can I use on PLOT to eventually get a GIF file? Thanks.

You should have read our responses more carefully. At least 3 of us suggested
that you use the Z pseudo-device (SET_PLOT, 'Z'). This solves these problems.
You can PLOT to and do TVRD() from the Z device from a batch file.

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Getting current time
Next Topic: Re: Editing Ascii File

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

Current Time: Fri Oct 10 09:07:49 PDT 2025

Total time taken to generate the page: 1.11891 seconds