Description:
This Bourne-shell script converts a
256 grey-level or black-and-white dithered Tag Image File Format (
TIFF) into an unsigned-byte
NDF file. It handles one- or two-dimensional images. The script uses various
NETPBM utilities to
produce a FITS file, flipped top to bottom, and then
FITS2NDF to produce the final NDF.
Error messages are converted into Starlink style (preceded by
!
).
Usage:
tiff2ndf in [out]
Parameters:
IN = FILENAME (Read)
The name of the TIFF file to be converted. (A .tif
name extension is assumed if omitted.)
OUT = NDF (Write)
The name of the NDF to be
generated (without the .sdf
extension). If this is omitted, the value of the IN parameter is used.
Examples:
tiff2ndf old new
This converts the TIFF file old.tif
into an NDF called
new (in file new.sdf
). tiff2ndf horse
This converts the TIFF file horse.tif
into an NDF
called horse (in file horse.sdf
). Notes:
The following points should be remembered:
-
This initial version of the script handles only greyscale or b/w dithered images. You are responsible
for conversion of your images to this format prior to use, including the conversion of RGB values to
brightness values.
-
Input image file names must have the extension .tif
.
-
The NETPBM utilities tifftopnm
, ppmtopgm
, pnmflip
and pnmtofits
must be available on your PATH.
Related Applications
Copyright © 2015 Science and Technology Research Council