Re: How to make GIF file? [message #4543] |
Sat, 10 June 1995 00:00  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <3ra31t$j08@hecate.umd.edu>, bleau@UMDSP.UMD.EDU (Lawrence Bleau) writes:
> Hi. I running IDL V3.6.1 and have a question about plotting. First, let me
> describe what I'm trying to do overall, in case anyone has a better suggestion
> on how to do it.
>
> I want to create a GIF file to put on my system and have it served over the WWW
> to other sites. This GIF file is a fairly simple plot, with X- and Y-axis, a
> bunch of points, and lines connecting them. The raw data for this is an Ascii
> file with columns of floating point numbers.
>
> I figure we'll have to write a procedure to read in the values, do some
> decision making, and plot them. I know about the PLOT command in IDL, and
> there's enough information I can slug through it and tailor my plots properly;
> if not I'll just come back here for more info.
>
> The puzzling part is how to have PLOT generate a GIF image file. I looked at
> SET_PLOT, which has a slew of options on output devices (PostScript, HP PCL,
> CGM, etc.). GIF, however, is *not* one of those options. I noticed there is a
> WRITE_GIF command, but the manual (unless I've looked in the wrong place)
> doesn't say how to call it and what it's arguments are. Okay, so one of the
> arguments is an array in GIF format. That begs the question, however: How does
> one create the GIF image in the first place? If it isn't done with PLOT, then
> how? If it is, what's the magic keyword?
>
Try the following:
IDL> set_plot, 'z' ; Select the Z pseudo device
; Set the resolution, turn off Z buffering for increased speed
IDL> device, set_resolution=[800, 500], z=0
IDL> plot, findgen(100) ; Draw the plot
IDL> buff = tvrd() ; Read the bitmap back into an IDL variable
IDL> write_gif, 'filename', buff, ...
____________________________________________________________
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)
|
|
|