test: icm.h Source File

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# icm.h

Go to the documentation of this file.

    00001 #ifndef ICM_H
    00002 #define ICM_H
    00003 #include "windows.h"
    00004 #include "icc.h"
    00005 #include "icc_i386.h"
    00006
    00007 #define CMS_GET_VERSION     0x00000000
    00008 #define CMS_GET_IDENT       0x00000001
    00009 #define CMS_GET_DRIVER_LEVEL 0x00000002
    00010 #define CMS_GET_RESERVED    0xFFFFFFFC
    00011
    00012 #define CMS_LEVEL_1         0x00000001
    00013 #define CMS_LEVEL_2         0x00000002
    00014 #define CMS_LEVEL_3         0x00000004
    00015 #define CMS_LEVEL_RESERVED  0xFFFFFFFC
    00016
    00017
    00018
    00019 #define CMS_FORWARD         0x00000000
    00020 #define CMS_BACKWARD        0x00000001
    00021
    00022 #define CMS_X555WORD        0x00000000
    00023 #define CMS_565WORD         0x00000001
    00024 #define CMS_RGBTRIPLETS     0x00000002
    00025 #define CMS_BGRTRIPLETS     0x00000004
    00026 #define CMS_XRGBQUADS       0x00000008
    00027 #define CMS_XBGRQUADS       0x00000010
    00028 #define CMS_QUADS           0x00000020
    00029
    00030 #ifndef ICMDLL
    00031 #define LCS_CALIBRATED_RGB  0x00000000
    00032 #define LCS_DEVICE_RGB      0x00000001
    00033 #define LCS_DEVICE_CMYK     0x00000002
    00034
    00035 #define LCS_GM_DEFAULT      0x00000000
    00036 #define LCS_GM_BUSINESS     0x00000001
    00037 #define LCS_GM_GRAPHICS     0x00000002
    00038 #define LCS_GM_IMAGES       0x00000004
    00039 #endif
    00040
    00041 // Use printer colors       == 0
    00042 // Change all RGBs          == CM_USE_ICM;
    00043 // Select downloaded CRD    == CM_USE_CS | CM_USE_CRD
    00044 // Download/select CRD      == CM_USE_CS | CM_USE_CRD | CM_SEND_CRD
    00045 // Use Sony                 == CM_USE_CS
    00046 #define CM_USE_CS           0x00000001
    00047 #define CM_USE_CRD          0x00000002
    00048 #define CM_SEND_CRD         0x00000004
    00049 #define CM_USE_ICM          0x00000008
    00050 #define CM_CMYK_IN          0x00000010
    00051 #define CM_CMYK_DIB_IN      0x00000020
    00052 #define CM_CMYK_OUT         0x00000040
    00053 #define CM_CMYK             CM_CMYK_IN | CM_CMYK_DIB_IN | CM_CMYK_OUT
    00054
    00055
    00056 //typedef HANDLE      HCOLORSPACE;
    00057 typedef DWORD       HCTMTRANSFORM;
    00058
    00059
    00060 /*  Logical Color Space Structure */
    00061
    00062 #ifndef ICMDLL
    00063 typedef struct tagLOGCOLORSPACE {
    00064 DWORD lcsSignature;
    00065 DWORD lcsVersion;
    00066 DWORD lcsSize;
    00067 DWORD lcsCSType;
    00068 DWORD lcsGamutMatch;
    00069 CIEXYZTRIPLE lcsEndpoints;
    00070 DWORD lcsGammaRed;
    00071 DWORD lcsGammaGreen;
    00072 DWORD lcsGammaBlue;
    00073 char    lcsFilename[MAX_PATH];
    00074 } LOGCOLORSPACE;
    00075 typedef LOGCOLORSPACE FAR *LPLOGCOLORSPACE;
    00076 #endif
    00077
    00078 typedef struct tagICMINFO {
    00079         LOGCOLORSPACE   lcsSource;  // source image colorspace
    00080         HCTMTRANSFORM   hICMT;      // Handle to the associated transform
    00081         char            lcsDestFilename[256];
    00082         LPSTR           lppd;       // Used to find the buffered bitmap.
    00083                                     // Fix bug 195632. jjia  2/20/97.
    00084 } ICMINFO , FAR *LPICMINFO;
    00085
    00086
    00087 typedef enum {CS_DEVICE_RGB = 0, CS_DEVICE_CMYK,
    00088                         CS_CALIBRATED_RGB, CS_SONY_TRINITRON } CSPACESET;
    00089
    00090
    00091 #ifndef ICMDLL
    00092 BOOL FAR PASCAL EnableICM(HDC, BOOL);
    00093 HANDLE FAR PASCAL LoadImageColorMatcher(LPSTR);
    00094 BOOL FAR PASCAL FreeImageColorMatcher(HANDLE);
    00095 int FAR PASCAL EnumColorProfiles(HDC,FARPROC,LPARAM);
    00096 BOOL FAR PASCAL CheckColorsInGamut(HDC,LPVOID,LPVOID,DWORD);
    00097 HANDLE FAR PASCAL GetColorSpace(HDC);
    00098 BOOL FAR PASCAL GetLogColorSpace(HCOLORSPACE,LPVOID,DWORD);
    00099 HCOLORSPACE FAR PASCAL CreateColorSpace(LPLOGCOLORSPACE);
    00100 BOOL FAR PASCAL SetColorSpace(HDC,HCOLORSPACE);
    00101 BOOL FAR PASCAL DeleteColorSpace(HCOLORSPACE);
    00102 BOOL FAR PASCAL GetColorProfile(HDC,LPSTR,WORD);
    00103 BOOL FAR PASCAL SetColorProfile(HDC,LPSTR);
    00104 BOOL FAR PASCAL GetDeviceGammaRamp(HDC,LPVOID);
    00105 BOOL FAR PASCAL SetDeviceGammaRamp(HDC,LPVOID);
    00106 BOOL FAR PASCAL ColorMatchToTarget(HDC,HDC,WORD);
    00107 #endif
    00108
    00109 //#define CS_ENABLE       1
    00110 //#define CS_DISABLE      2
    00111 //#define CS_DELETE_TRANSFORM 3
    00112
    00113 DWORD _loadds FAR PASCAL CMGetInfo(DWORD dwInfo);
    00114
    00115 HCTMTRANSFORM _loadds      FAR PASCAL CMCreateTransform(LPLOGCOLORSPACE lpCS,
    00116                                                 LPSTR lpDevCh, LPSTR lpTargetDevCh);
    00117
    00118 BOOL _loadds    FAR PASCAL  CMDeleteTransform(HCTMTRANSFORM hTransform);
    00119
    00120 BOOL _loadds    FAR PASCAL  CMTranslateRGB(HCTMTRANSFORM hTransform,RGBQUAD RGBQuad,
    00121                                                 LPVOID lpResult, DWORD dwFlags);
    00122
    00123 BOOL _loadds    FAR PASCAL  CMTranslateRGBs(HCTMTRANSFORM hTransform,
    00124                                                  LPVOID    lpSrc, DWORD dwSrcFlags,
    00125                                                         DWORD nSrcWidth, DWORD nSrcHeight, DWORD nSrcStride,
    00126                                                  LPVOID lpDest, DWORD dwDestFlags, DWORD dwFlags);
    00127
    00128 BOOL _loadds    FAR PASCAL   CMCheckColorsInGamut(HCTMTRANSFORM hTransform,
    00129                                                  LPVOID   lpSrc,
    00130                                                  LPVOID lpDest, DWORD dwCount);
    00131 BOOL _loadds    FAR PASCAL   CMGetPS2ColorSpaceArray(
    00132                                                  LPSTR       lpProfileName,
    00133                                                  DWORD       InputIntent,
    00134                                                  WORD        InpDrvClrSp,
    00135                                                  MEMPTR      lpBuffer,
    00136                                                  LPDWORD     lpcbSize,
    00137                                                  BOOL        AllowBinary);
    00138
    00139 BOOL _loadds    FAR PASCAL   CMGetPS2ColorRenderingDictionary(
    00140                                                  LPSTR       lpProfileName,
    00141                                                  DWORD       Intent,
    00142                                                  MEMPTR      lpMem,
    00143                                                  LPDWORD     lpcbSize,
    00144                                                  BOOL        AllowBinary);
    00145
    00146 BOOL _loadds    FAR PASCAL  CMGetPS2ColorRenderingIntent(
    00147                                                  LPSTR       lpProfileName,
    00148                                                  DWORD       Intent,
    00149                                                  MEMPTR      lpMem,
    00150                                                  LPDWORD     lpcbSize);
    00151
    00152
    00153 HCTMTRANSFORM _loadds      FAR PASCAL ICMCreateTransform(LPLOGCOLORSPACE lpCS,
    00154                                                 LPSTR lpDevCh, LPSTR lpTargetDevCh);
    00155
    00156 BOOL _loadds    FAR PASCAL  ICMDeleteTransform(HCTMTRANSFORM hTransform);
    00157
    00158 BOOL _loadds    FAR PASCAL  ICMTranslateRGB(HCTMTRANSFORM hTransform, RGBQUAD RGBQuad,
    00159                                                 LPVOID lpResult, DWORD dwFlags);
    00160
    00161 BOOL _loadds    FAR PASCAL  ICMTranslateRGBs(HCTMTRANSFORM hTransform,
    00162                                                  LPVOID    lpSrc, DWORD dwSrcFlags,
    00163                    DWORD nSrcWidth, DWORD nSrcHeight, DWORD nSrcStride,
    00164                                                  LPVOID lpDest, DWORD dwDestFlags, DWORD dwFlags);
    00165
    00166 BOOL _loadds    FAR PASCAL   ICMCheckColorsInGamut(HCTMTRANSFORM hTransform,
    00167                                                  LPVOID   lpSrc,
    00168                                                  LPVOID lpDest, DWORD dwCount);
    00169 // ALWAYS_ICM
    00170 HCTMTRANSFORM _loadds FAR PASCAL CreateDefTransform (LPVOID lppd);
    00171 BOOL _loadds FAR PASCAL DeleteDefTransform (HCTMTRANSFORM hTransform);
    00172 #ifndef ICMDLL
    00173 BOOL ProfileSelection(LPPDEVICE lppd, LPSTR lpProfileName);
    00174 #endif
    00175 #endif
    00176