original 1.0.1 release
[xwelltris.git] / src / image / picinfo.h
blob070572387e401ea122f6ee0b5628759c009c4dac
1 #ifndef PICINFO_H
2 #define PICINFO_H
3 #include "config.h"
4 #include "globdef.h"
5 #ifdef HAVE_SYS_SIGEVENT_H
6 #include <sys/sigevent.h>
7 #endif
8 #include <stdio.h>
9 #include <ctype.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include <sys/param.h>
13 #include <sys/types.h>
14 #ifndef __FreeBSD__
15 #elif ! defined __OpenBSD__
16 #include <malloc.h>
17 #endif
18 #include <fcntl.h>
19 #include <unistd.h>
22 #undef PARM
23 #ifdef __STDC__
24 # define PARM(a) a
25 #else
26 # define PARM(a) ()
27 # define const
28 #endif
30 #define MONO(rr,gg,bb) (((rr)*11+(gg)*16+(bb)*5)>>5) /*0.33r+0.5g+0.17b*/
31 #ifndef PCD_DEFS
32 #define RANGE(a,b,c) {if(a<b) a=b;if(a>c) a=c;}
33 #endif
35 #define GETWD(x) getcwd(x,sizeof(x))
37 #define True 1
38 #define False 0
39 #define TRUE 1
40 #define FALSE 0
41 #define F_COLORS 0
42 #define F_FORMAT 1
43 #define PIC8 0
44 #define PIC24 1
45 #define F_FULLCOLOR 0
46 #define F_GREYSCALE 1
47 #define F_BWDITHER 2
48 #define F_REDUCED 3
50 #define CMP_AUTO 0
51 #define CMP_OWN 1
52 #define CMP_COM 2
53 #define F_GIF 0
54 #define F_PM 1
55 #define F_PBMRAW 2
56 #define F_PBMASCII 3
57 #define F_XBM 4
58 #define F_SUNRAS 5
59 #define F_BMP 6
60 #define F_PS 7
61 #define F_IRIS 8
62 #define F_JPEG 9
63 #define F_AUTO 11
64 #define F_TIFF 10
65 #define F_PCX 12
66 #define F_TARGA 13
67 #define F_XPM 14
68 #define F_PCD 15
69 #define F_PNG 16
71 #define CONV24_FAST 5
72 #define CONV24_SLOW 6
73 #define CONV24_BEST 7
75 #define ALG_NONE 0
76 #define ALG_BLUR3 2
77 #define ALG_BLUR5 3
78 #define ALG_BLUR7 4
79 #define ALG_BLUR9 1
80 #define ALG_EDGE 5
81 #define ALG_TINF 6
82 #define ALG_OIL 7
83 #define ALG_GRAY 8
85 typedef unsigned char byte;
86 #ifndef JPEG_IMAGES
87 #ifndef PCD_DEFS
88 #ifndef u_short
89 typedef unsigned short u_short;
90 #endif
91 #ifndef u_char
92 typedef unsigned char u_char;
93 #endif
94 #ifndef u_int
95 typedef unsigned int u_int;
96 #endif
97 #ifndef u_long
98 typedef unsigned long u_long;
99 #endif
100 #endif
101 #endif
103 extern int numcols;
104 extern float normaspect;
105 extern int conv24;
106 extern int noqcheck;
107 extern int picType,pWIDE,pHIGH,ncols;
108 extern byte bMap[256],gMap[256],rMap[256];
109 extern byte* pic;
110 extern byte colAllocOrder[256];
112 typedef struct { byte *pic; /* image data */
113 int w, h; /* size */
114 int type; /* PIC8 or PIC24 */
116 byte pal[768];
117 /* colormap, if PIC8 */
119 int frmType; /* def. Format type to save in */
120 int colType; /* def. Color type to save in */
121 char fullInfo[128]; /* Format: field in info box */
122 char shrtInfo[128]; /* short format info */
123 char *comment; /* comment text */
125 int numpages; /* # of page files, if >1 */
126 char pagebname[64]; /* basename of page files */
127 } PICINFO;
128 #endif
129 /* ------------ End of file -------------- */