Description:
This Bourne-shell script converts a
Graphics Interchange Format (
GIF) file into an unsigned-byte (256 grey-level)
NDF format 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:
gif2ndf in [out]
Parameters:
IN = FILENAME
(Read)
The name of the GIF file to be converted. (A .gif
name extension is assumed if omitted.)
OUT = NDF (Write)
The name of the NDF to be generated (without the .sdf
extension). If the OUT
parameter is omitted, the value of the IN parameter is used.
Examples:
gif2ndf old new
This converts the GIF file old.gif
into an NDF called new (in file new.sdf
). gif2ndf
horse
This converts the GIF file horse.gif
into an NDF called horse (in file horse.sdf
).
Notes:
The following points should be remembered:
-
This initial version of the script generates images with at most 256 grey levels. It does not use the
image colour lookup table.
-
Input image filenames must have the file extension .gif
.
-
The NETPBM utilities giftopnm
, ppmtopgm
, pnmflip
and pnmtofits
must be available on your PATH.
Related Applications
Copyright © 2015 Science and Technology Research Council