Re: creating gif files

From: James Stricherz (stricher@XXXXXX)
Date: Thu Jun 15 1995 - 10:26:45 MDT


So it was written by Mary Schoen Petersen:

+ Along those lines, I know quite a few people that would be *very*
+ interested to know how to *automatically* create gif files from an
+ ncarg meta or cgm file. Have the authors of NCAR Graphics included a
+ utility to do that?? Seems like it might be a common request...

Automatically? no. Automajikally? yes. Through a bizarre combination
of Makefiles, perl scripts, fortran and the NetPBM utilities, I can
do this fairly painlessly. Here's how it goes:

1. generate gmeta file
2. rasterize it into an SGI RGB image
3. invert the image
4. crop the image to include only the plot + reasonable border
5. convert the resultant image to gif or jpeg

Notes:

Step 2. was a hardware-dependant choice: we have SGI's. I don't think
the choice really matters _as long as you can manipulate the file_.

Step 4. is necessary because if you have a plot that doesn't occupy the
entire frame, you will end up with large borders. I used pnmcut from
the NetPBM package, but this requires _a priori_ knowledge of the plot
area that you interested in.

Step 5. Another nice part of the NetPBM package is that you may make
transparent gifs.

For examples of the results, see<http://www.coaps.fsu.edu/togawinds/>.
I let perl scripts do the actual dirty work. The only real downside
is that this a compute intensive procedure, and is not recommended for
"on-the-fly" image creation for use in Web Pages.

Perhaps once NCARG v4.0 and the NCAR Command Language is released we
will see something a bit nicer to work with?

James



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:32 MDT