Subject: Re: FITS to GIF format

From: [email-masked] (Adam Bernstein)
Date: 20 Apr 1994 20:06:48 GMT

In article <[email-masked]>, [email-masked] (Andrew Berman) writes:
|> Is there some program somewhere that will
|> convert a FITS file to GIF or JPG format?
|> 

	I wrote one based on routines from the XV package.  You can get 
it by anonymous ftp to csi.jpl.nasa.gov (128.149.29.4) in the directory
pub/users/adam.  The file is tar'ed and compressed, called convert.tar.Z,
and contains code as well as binaries for FITS2GIF as well as a few other
things.  If you want some other format or want it emailed, let me know.

	Note that this program is ideal for converting a large number of
images non-interactively, but if you want to do any contrast enhancement
or manipulation of the color map, and you are working with a small number
of images, your best bet is probably to read the images into XV one by
one, make any adjustments, and then save as GIF or JPEG.  XV does not come
with FITS reading capability built in, but it is provided in the unsupported
directory of the XV package, and these routines (with a few corrections)
along with the correctly modified versions of a few other XV source files
are also included in the convert.tar.Z file.  Copy these source files into
your XV directory and rebuild it, and you should be able to read and write
FITS files with no problem.

	Adam
-- 
------------------------------------------------------------------------
Adam Bernstein               Phone: 818 354-9784    Jet Propulsion Lab
Guidance & Control /         FAX:   818 393-6105    MS 198-235
  Optical Tracking Group                            4800 Oak Grove Dr.
[email-masked]                        Pasadena, CA 91109
------------------------------------------------------------------------

---

From: [email-masked] (philip hodder)
Date: 20 Apr 1994 19:41:20 GMT

> things.  If you want some other format or want it emailed, let me know.

You can also use the PBM utilities by Jeff Poskanzer (sp?). Should be widely
available on various net sites

   fitstopgm foo.fits | pgmtoppm | ppmtogif > foo.gif

or some such invocation.

		Phil.

------------------------------------------------------------------------------
  Philip J. C. Hodder                      INTERNET: [email-masked]
  Dept. of Geophysics & Astronomy          PHONE:    (604) 822-6722 
  #129-2219 Main Mall                      FAX:      (604) 822-6047
  University of British Columbia          
  Vancouver, British Columbia, Canada         
  V6T 1Z4                                  
------------------------------------------------------------------------------
"The further thought occurs that we haven't budged a smegging inch!"
						           - Rimmer, Red Dwarf
------------------------------------------------------------------------------