Table of Contents


fitstiff - convert FITS file into TIFF file


fitstiff [parameter=value]


fitstiff converts a fits(5NEMO) into a tiff file. The data are scaled between 0 and 255 as a 8 bit image.

In principle multiple image planes can be stored in a single tiff file (but the author doesn’t know how to do it yet).

Although by default there is no colormap written, and the image is really a 8-bit greyscale, a colormap can be defined from a 256-entry ascii RGB table, of which examples can be found in $NEMODAT/lut.


The following parameters are recognized in any order if the keyword is also given:
Input fits file. No default.
Output tiff file. No default.
Planes to select from fits cube [all] Plane numbers run from 1 to the length of the 3rd axis of the cube.
Min, if to override FITS header value ’DATAMIN’. By default the FITS reader tries to be smart and searches the FITS header for what the datamin should be.
Max, if to override FITS header value ’DATAMAX’. See comments above.
Name of colormap. This may be a full filename, or it’s basename where a searchpath ".:$NEMODAT/lut" will be tried to find the LUT table file. A default extension ".lut" is assumed. Default: no colortable, the output TIFF file will be a greyscale map.
Turn LZW compresssion on? [Default: t].

Tiff Classes

fitstiff does not support all known TIFF Classes:
Class B
for bilevel (1-bit) images. Not supported.
Class G
for grayscale images. This is the default.
Class P
for palette color images. Only used when a RGB look-up table is supplied (see lut=).
Class R
for RGB full color images. Not supported.
Class F
For Faxes. Not supported.


The datamin/max is only attempted to be retrieved from the FITS header, if not given as an explicit parameter to the program. The data is not scanned.


After a tiff file has been constructed, it can be previewed in a number of ways:

If your system manager has installed xtiff, it’s straightforward:

    xtiff tiff_file

If Jef Poskanzer’s PBM package has been installed, the following may also work:

    tifftopnm < tiff_file | pnmtoxwd | xwud
The public domain package libtiff(3) contains a number of utilities to operate on TIFF files, and the SDSC program imconv(1) converts TIFF to a variety of other formats.

See Also

xtiff(1) , fits(5NEMO) , tiffinfo(1) , libtiff(3)


Peter Teuben


$NEMODAT/lut    directory of ascii RGB look-up tables

Update History

xx-nov-91    V0 Created - never used though    PJT
15-nov-92    V0.1 smart autoscaling       PJT
25-may-95    V0.2 added compress=, fixed bug due to new fitsio    PJT

Table of Contents