Subject: Re: fitstopgm - hold it!

From: [email-masked] (Karl Glazebrook)
Date: 6 Jun 1994 12:09:23 -0500

In article [email-masked], [email-masked] (Henry Leparskas) writes:
>	Karl mentioned the following solution;
> 
>>- use fitstopgm & ppmtogif if you HAVE the pbmplus
>>package.
>
>	Is there a missing step here? I don't find
>a pgmtoppm or pgmtogif in my version of pbmplus.
>How to you get the pgm file into GIF?
>

Why not just trust me? :-)

If you had just TRIED it instead of asking first you would have
found it works:

fitstopgm test.fits | ppmtogif > test.gif

If you read the pbmplus documentation you will find that ppm's are
colour images - grey images (pgm) are automatically converted to colour
on the fly. It is heirachical - i.e. ppm progrems can always cope with
pgms and pbms, etc.

BTW you ought to bear in mind that GIFs are only 8 bits while
FITS are 16 bits - so you would probably need to do some rescaling
first to get the dynamic range you require.

---
Karl Glazebrook,           email:  [email-masked] 
Institute of Astronomy,   finger:  [email-masked]
Cambridge, U.K.              WWW:  http://cast0.ast.cam.ac.uk/~kgb/

---

From: [email-masked] (Derek C. Richardson)
Date: 6 Jun 1994 10:51:49 -0500

In article <[email-masked]>,
Henry Leparskas <[email-masked]> wrote:
>Hi,

No missing step: ppmtogif treats pgm (portable graymap) as a *subset* of
ppm (portable pixmap, i.e. full "colour"):

   fitstopgm my_file.fits | ppmtogif > my_file.gif

The result will be a grayscale gif representation of the FITS file.

Hope this helps,

Derek

P.S. There *is* a pgmtoppm function in my version, though you don't need
it to accomplish the step above.

___     ___ ____   ------------------------------------------------------
____   __   _____  | Derek C. Richardson   | Tel: (416) 978-6879/8494   |
_____ __    ____   | CITA, McLennan Labs   |      (416) 487-7014 (home) |
____   __   __ __  | U of T, Toronto, Ont. | Fax: (416) 978-3921        |
___     ___ __  _  | CANADA M5S 1A7        | [email-masked]  |
                   ------------------------------------------------------

---

From: [email-masked] (Karl Glazebrook)
Date: 6 Jun 1994 13:00:47 -0500

PS there IS a pgmtoppm but that does something else - it lets
you colorisze a grey map using a lookuptable (i.e. more
sophisticated than the on the fly conversion).

If you haven't got it I suggest you pbm+ is incomplete.

---