1 #if !defined(__ximadefs_h)
6 #if defined(_AFXDLL)||defined(_USRDLL)
7 #define DLL_EXP __declspec(dllexport)
8 #elif defined(_MSC_VER)&&(_MSC_VER<1200)
9 #define DLL_EXP __declspec(dllimport)
15 #if CXIMAGE_SUPPORT_EXCEPTION_HANDLING
17 #define cx_throw(message) throw(message)
18 #define cx_catch catch (const char *message)
20 #define cx_try bool cx_error=false;
21 #define cx_throw(message) {cx_error=true; if(strcmp(message,"")) strncpy(info.szLastError,message,255); goto cx_error_catch;}
22 #define cx_catch cx_error_catch: char message[]=""; if(cx_error)
26 #if CXIMAGE_SUPPORT_JP2 || CXIMAGE_SUPPORT_JPC || CXIMAGE_SUPPORT_PGX || CXIMAGE_SUPPORT_PNM || CXIMAGE_SUPPORT_RAS
27 #define CXIMAGE_SUPPORT_JASPER 1
29 #define CXIMAGE_SUPPORT_JASPER 0
32 #if CXIMAGE_SUPPORT_DSP
33 #undef CXIMAGE_SUPPORT_TRANSFORMATION
34 #define CXIMAGE_SUPPORT_TRANSFORMATION 1
37 #if CXIMAGE_SUPPORT_TRANSFORMATION || CXIMAGE_SUPPORT_TIF || CXIMAGE_SUPPORT_TGA || CXIMAGE_SUPPORT_BMP || CXIMAGE_SUPPORT_WINDOWS
38 #define CXIMAGE_SUPPORT_BASICTRANSFORMATIONS 1
41 #if CXIMAGE_SUPPORT_DSP || CXIMAGE_SUPPORT_TRANSFORMATION
42 #undef CXIMAGE_SUPPORT_INTERPOLATION
43 #define CXIMAGE_SUPPORT_INTERPOLATION 1
46 #if defined (_WIN32_WCE)
47 #undef CXIMAGE_SUPPORT_WMF
48 #define CXIMAGE_SUPPORT_WMF 0
51 #if !defined(WIN32) && !defined(_WIN32_WCE)
52 #undef CXIMAGE_SUPPORT_WINDOWS
53 #define CXIMAGE_SUPPORT_WINDOWS 0
57 #define min(a,b) (((a)<(b))?(a):(b))
60 #define max(a,b) (((a)>(b))?(a):(b))
64 #define PI 3.141592653589793f
68 #if defined(WIN32) || defined(_WIN32_WCE)
78 #ifndef _COMPLEX_DEFINED
80 typedef struct tagcomplex {
86 #define _cabs(c) sqrt(c.x*c.x+c.y*c.y)
91 #if !defined(WIN32) && !defined(_WIN32_WCE)
97 typedef unsigned char BYTE;
98 typedef unsigned short WORD;
99 typedef unsigned long DWORD;
100 typedef unsigned int UINT;
102 typedef DWORD COLORREF;
103 typedef unsigned int HANDLE;
123 typedef struct tagRECT
131 typedef struct tagPOINT
137 typedef struct tagRGBQUAD {
146 typedef struct tagBITMAPINFOHEADER{
154 long biXPelsPerMeter;
155 long biYPelsPerMeter;
157 DWORD biClrImportant;
160 typedef struct tagBITMAPFILEHEADER {
168 typedef struct tagBITMAPCOREHEADER {
176 typedef struct tagRGBTRIPLE {
187 #define BI_BITFIELDS 3L
189 #define GetRValue(rgb) ((BYTE)(rgb))
190 #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
191 #define GetBValue(rgb) ((BYTE)((rgb)>>16))
192 #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
194 #ifndef _COMPLEX_DEFINED
196 typedef struct tagcomplex {
202 #define _cabs(c) sqrt(c.x*c.x+c.y*c.y)