May 2, 2001; Ralph E. Griswold
This file is in the public domain.
This program accepts file names from standard input and writes their
image type to standard output.
imagetyp(s) attempts to determine the type of image file named s.
This is, of course, problematical and corrupted or fake files can
easily fool it. Furthermore, examples of some image files types
were not available for testing.
The types presently recognized are:
value returned image file type
ps PostScript document
cgm text Computer Graphics Metafile, text
cgm binary Computer Graphics Metafile, binary
cgm char Computer Graphics Metafile, character
sundraw SunDraw document
ras UNIX raster image
iris Iris image
rle UNIX RLE image
pbm PBM image
pgm PGM image
ppm PPM image
xwd X Window dump
gif Compuserv GIF image
bmp BMP image
xmp XMP image
xpm XPM image
pcx PCX image
tiff TIFF image
iff IFF/ILBM image
? unknown type
If the file cannot be opened or is empty, imagetyp() fails.
Source code |
Program Library Page |
Icon Home Page