File: imagetypes.h

package info (click to toggle)
xloadimage 4.1-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 2,580 kB
  • ctags: 3,902
  • sloc: ansic: 35,724; makefile: 410; asm: 284; sh: 107
file content (113 lines) | stat: -rw-r--r-- 3,259 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/* imagetypes.h:
 *
 * supported image types and the imagetypes array declaration.  when you
 * add a new image type, only the makefile and this header need to be
 * changed.
 *
 * jim frost 10.15.89
 */

Image *niffLoad();
Image *facesLoad();
Image *pbmLoad();
Image *sunRasterLoad();
Image *gifLoad();
Image *rleLoad();
Image *xwdLoad();
Image *vffLoad();
Image *xbitmapLoad();
Image *xpixmapLoad();
Image *fbmLoad();
Image *pcxLoad();
Image *imgLoad();
Image *macLoad();
Image *cmuwmLoad();
Image *mcidasLoad();
#if 0
Image *pdsLoad();
#else
Image *vicarLoad();
#endif
#ifdef HAS_JPEG
Image *jpegLoad();
#endif
#ifdef HAS_TIFF
Image *tiffLoad();
#endif

int niffIdent();
int facesIdent();
int pbmIdent();
int sunRasterIdent();
int gifIdent();
int rleIdent();
int xwdIdent();
int vffIdent();
int xbitmapIdent();
int xpixmapIdent();
int fbmIdent();
int pcxIdent();
int imgIdent();
int macIdent();
int cmuwmIdent();
int mcidasIdent();
#if 0
int pdsIdent();
#else
int vicarIdent();
#endif
#ifdef HAS_JPEG
int jpegIdent();
#endif
#ifdef HAS_TIFF
int tiffIdent();
#endif

void niffDump();
#ifdef HAS_JPEG
void jpegDump();
#endif
#ifdef HAS_TIFF
void tiffDump();
#endif
void pbmDump();

/* some of these are order-dependent
 */

struct {
  int    (*identifier)(); /* print out image info if this kind of image */
  Image *(*loader)();     /* load image if this kind of image */
  void   (*dumper)();     /* dump image of this kind */
  char  *type;            /* image type name */
  char  *name;            /* name of this image format */
} ImageTypes[] = {
  niffIdent,      niffLoad,      niffDump,    "niff",      "Native Image File Format (NIFF)",
  sunRasterIdent, sunRasterLoad, NULL,        "sunraster", "Sun Rasterfile",
  gifIdent,       gifLoad,       NULL,        "gif",       "GIF Image",
#ifdef HAS_JPEG
  jpegIdent,      jpegLoad,      jpegDump,    "jpeg",      "JFIF-style JPEG Image",
#endif
#ifdef HAS_TIFF
  tiffIdent,      tiffLoad,      tiffDump,    "tiff",      "TIFF image",
#endif
  fbmIdent,       fbmLoad,       NULL,        "fbm",       "FBM Image",
  cmuwmIdent,     cmuwmLoad,     NULL,        "cmuraster", "CMU WM Raster",
  pbmIdent,       pbmLoad,       pbmDump,     "pbm",       "Portable Bit Map (PBM, PGM, PPM)",
  facesIdent,     facesLoad,     NULL,        "faces",     "Faces Project",
  rleIdent,       rleLoad,       NULL,        "rle",       "Utah RLE Image",
  xwdIdent,       xwdLoad,       NULL,        "xwd",       "X Window Dump",
  vffIdent,       vffLoad,       NULL,        "vff",       "Sun Visualization File Format",
  mcidasIdent,    mcidasLoad,    NULL,        "mcidas",    "McIDAS areafile",
#if 0
  pdsIdent,       pdsLoad,       NULL,        "pds",       "PDS/VICAR Image",
#else
  vicarIdent,     vicarLoad,     NULL,        "vicar",     "VICAR Image",
#endif
  pcxIdent,       pcxLoad,       NULL,        "pcx",       "PC Paintbrush Image",
  imgIdent,       imgLoad,       NULL,        "gem",       "GEM Bit Image",
  macIdent,       macLoad,       NULL,        "macpaint",  "MacPaint Image",
  xpixmapIdent,   xpixmapLoad,   NULL,        "xpm",       "X Pixmap",
  xbitmapIdent,   xbitmapLoad,   NULL,        "xbm",       "X Bitmap",
  NULL,           NULL,          NULL,         NULL,        NULL
};