X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=utilities%2FCxImage%2Fximacfg.h;h=92a6cb6f8627ef9753af77d3184b62d046235105;hb=7615e289788483e21028050638195e29c4e34321;hp=d9d2ab966f2d7e8883c76078993f42c2d66bb8ea;hpb=3fd15028ab81e6746d3af96695526d7d973a26c8;p=clitk.git diff --git a/utilities/CxImage/ximacfg.h b/utilities/CxImage/ximacfg.h index d9d2ab9..92a6cb6 100644 --- a/utilities/CxImage/ximacfg.h +++ b/utilities/CxImage/ximacfg.h @@ -1,72 +1,78 @@ -#if !defined(__ximaCFG_h) -#define __ximaCFG_h - -///////////////////////////////////////////////////////////////////////////// -// Protability issues -#ifndef _tfopen -# define _tfopen fopen -#endif -#ifndef LPCTSTR -# define LPCTSTR char* -#endif -#ifndef HDC -# define HDC void* -#endif -#ifndef _tcsnicmp -# define _tcsnicmp strncasecmp -#endif - -///////////////////////////////////////////////////////////////////////////// -// CxImage supported features -#define CXIMAGE_SUPPORT_ALPHA 1 -#define CXIMAGE_SUPPORT_SELECTION 1 -#define CXIMAGE_SUPPORT_TRANSFORMATION 0 -#define CXIMAGE_SUPPORT_DSP 0 -#define CXIMAGE_SUPPORT_LAYERS 1 -#define CXIMAGE_SUPPORT_INTERPOLATION 0 - -#define CXIMAGE_SUPPORT_DECODE 1 -#define CXIMAGE_SUPPORT_ENCODE 1 // -#define CXIMAGE_SUPPORT_WINDOWS 0 - -///////////////////////////////////////////////////////////////////////////// -// CxImage supported formats -#define CXIMAGE_SUPPORT_BMP 0 -#define CXIMAGE_SUPPORT_GIF 1 -#define CXIMAGE_SUPPORT_JPG 0 -#define CXIMAGE_SUPPORT_PNG 0 -#define CXIMAGE_SUPPORT_ICO 0 -#define CXIMAGE_SUPPORT_TIF 0 -#define CXIMAGE_SUPPORT_TGA 0 -#define CXIMAGE_SUPPORT_PCX 0 -#define CXIMAGE_SUPPORT_WBMP 0 -#define CXIMAGE_SUPPORT_WMF 0 - -#define CXIMAGE_SUPPORT_JP2 0 -#define CXIMAGE_SUPPORT_JPC 0 -#define CXIMAGE_SUPPORT_PGX 0 -#define CXIMAGE_SUPPORT_PNM 0 -#define CXIMAGE_SUPPORT_RAS 0 - -#define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm - -#define CXIMAGE_SUPPORT_MNG 0 -#define CXIMAGE_SUPPORT_SKA 0 -#define CXIMAGE_SUPPORT_RAW 0 - -///////////////////////////////////////////////////////////////////////////// -#define CXIMAGE_MAX_MEMORY 268435456 - -#define CXIMAGE_DEFAULT_DPI 96 - -#define CXIMAGE_ERR_NOFILE "null file handler" -#define CXIMAGE_ERR_NOIMAGE "null image!!!" - -#define CXIMAGE_SUPPORT_EXCEPTION_HANDLING 1 - -///////////////////////////////////////////////////////////////////////////// -//color to grey mapping -//#define RGB2GRAY(r,g,b) (((b)*114 + (g)*587 + (r)*299)/1000) -#define RGB2GRAY(r,g,b) (((b)*117 + (g)*601 + (r)*306) >> 10) - -#endif +#if !defined(__ximaCFG_h) +#define __ximaCFG_h + +///////////////////////////////////////////////////////////////////////////// +// Protability issues +#ifdef ntohs +# undef ntohs +#endif +#ifdef ntohl +# undef ntohl +#endif +#ifndef _tfopen +# define _tfopen fopen +#endif +#ifndef LPCTSTR +# define LPCTSTR char* +#endif +#ifndef HDC +# define HDC void* +#endif +#ifndef _tcsnicmp +# define _tcsnicmp strncasecmp +#endif + +///////////////////////////////////////////////////////////////////////////// +// CxImage supported features +#define CXIMAGE_SUPPORT_ALPHA 1 +#define CXIMAGE_SUPPORT_SELECTION 1 +#define CXIMAGE_SUPPORT_TRANSFORMATION 1 +#define CXIMAGE_SUPPORT_DSP 0 +#define CXIMAGE_SUPPORT_LAYERS 1 +#define CXIMAGE_SUPPORT_INTERPOLATION 0 + +#define CXIMAGE_SUPPORT_DECODE 1 +#define CXIMAGE_SUPPORT_ENCODE 1 // +#define CXIMAGE_SUPPORT_WINDOWS 0 + +///////////////////////////////////////////////////////////////////////////// +// CxImage supported formats +#define CXIMAGE_SUPPORT_BMP 0 +#define CXIMAGE_SUPPORT_GIF 1 +#define CXIMAGE_SUPPORT_JPG 0 +#define CXIMAGE_SUPPORT_PNG 0 +#define CXIMAGE_SUPPORT_ICO 0 +#define CXIMAGE_SUPPORT_TIF 0 +#define CXIMAGE_SUPPORT_TGA 0 +#define CXIMAGE_SUPPORT_PCX 0 +#define CXIMAGE_SUPPORT_WBMP 0 +#define CXIMAGE_SUPPORT_WMF 0 + +#define CXIMAGE_SUPPORT_JP2 0 +#define CXIMAGE_SUPPORT_JPC 0 +#define CXIMAGE_SUPPORT_PGX 0 +#define CXIMAGE_SUPPORT_PNM 0 +#define CXIMAGE_SUPPORT_RAS 0 + +#define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm + +#define CXIMAGE_SUPPORT_MNG 0 +#define CXIMAGE_SUPPORT_SKA 0 +#define CXIMAGE_SUPPORT_RAW 0 + +///////////////////////////////////////////////////////////////////////////// +#define CXIMAGE_MAX_MEMORY 268435456 + +#define CXIMAGE_DEFAULT_DPI 96 + +#define CXIMAGE_ERR_NOFILE "null file handler" +#define CXIMAGE_ERR_NOIMAGE "null image!!!" + +#define CXIMAGE_SUPPORT_EXCEPTION_HANDLING 1 + +///////////////////////////////////////////////////////////////////////////// +//color to grey mapping +//#define RGB2GRAY(r,g,b) (((b)*114 + (g)*587 + (r)*299)/1000) +#define RGB2GRAY(r,g,b) (((b)*117 + (g)*601 + (r)*306) >> 10) + +#endif