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 #define LCS_GM_ABSOLUTE 0x0000FFFF
00040
#endif
00041
00042
00043
00044
00045
00046
00047 #define CM_USE_CS 0x00000001
00048 #define CM_USE_CRD 0x00000002
00049 #define CM_SEND_CRD 0x00000004
00050 #define CM_USE_ICM 0x00000008
00051 #define CM_CMYK_IN 0x00000010
00052 #define CM_CMYK_DIB_IN 0x00000020
00053 #define CM_CMYK_OUT 0x00000040
00054 #define CM_CMYK CM_CMYK_IN | CM_CMYK_DIB_IN | CM_CMYK_OUT
00055
00056
00057 typedef HANDLE
HCOLORSPACE;
00058 typedef DWORD HCTMTRANSFORM;
00059
00060
00061 #define REVCURVE_RATIO 1
00062
00063
00064
00065
#ifndef ICMDLL
00066
typedef struct tagLOGCOLORSPACE {
00067
DWORD lcsSignature;
00068
DWORD lcsVersion;
00069
DWORD lcsSize;
00070
DWORD lcsCSType;
00071
DWORD lcsGamutMatch;
00072 CIEXYZTRIPLE lcsEndpoints;
00073
DWORD lcsGammaRed;
00074
DWORD lcsGammaGreen;
00075
DWORD lcsGammaBlue;
00076
char lcsFilename[
MAX_PATH];
00077 }
LOGCOLORSPACE;
00078 typedef LOGCOLORSPACE FAR *
LPLOGCOLORSPACE;
00079
#endif
00080
00081
typedef struct tagICMINFO {
00082
LOGCOLORSPACE lcsSource;
00083
HCTMTRANSFORM hICMT;
00084
char lcsDestFilename[256];
00085
char lcsTargetFilename[256];
00086 LPSTR lppd;
00087
00088 }
ICMINFO ,
FAR *
LPICMINFO;
00089
00090
00091 typedef enum {
CS_DEVICE_RGB = 0,
CS_DEVICE_CMYK,
00092
CS_CALIBRATED_RGB,
CS_SONY_TRINITRON }
CSPACESET;
00093
00094
00095
#ifndef ICMDLL
00096
BOOL FAR PASCAL
EnableICM(HDC, BOOL);
00097 HANDLE
FAR PASCAL
LoadImageColorMatcher(LPSTR);
00098
BOOL FAR PASCAL
FreeImageColorMatcher(HANDLE);
00099
int FAR PASCAL
EnumColorProfiles(HDC,FARPROC,LPARAM);
00100
BOOL FAR PASCAL
CheckColorsInGamut(HDC,LPVOID,LPVOID,DWORD);
00101 HANDLE
FAR PASCAL
GetColorSpace(HDC);
00102
BOOL FAR PASCAL
GetLogColorSpace(HCOLORSPACE,LPVOID,DWORD);
00103
HCOLORSPACE FAR PASCAL
CreateColorSpace(LPLOGCOLORSPACE);
00104
BOOL FAR PASCAL
SetColorSpace(HDC,HCOLORSPACE);
00105
BOOL FAR PASCAL
DeleteColorSpace(HCOLORSPACE);
00106
BOOL FAR PASCAL
GetColorProfile(HDC,LPSTR,WORD);
00107
BOOL FAR PASCAL
SetColorProfile(HDC,LPSTR);
00108
BOOL FAR PASCAL
GetDeviceGammaRamp(HDC,LPVOID);
00109
BOOL FAR PASCAL
SetDeviceGammaRamp(HDC,LPVOID);
00110
BOOL FAR PASCAL
ColorMatchToTarget(HDC,HDC,WORD);
00111
#endif
00112
00113 #define CS_ENABLE 1
00114 #define CS_DISABLE 2
00115 #define CS_DELETE_TRANSFORM 3
00116
00117
DWORD _loadds
FAR PASCAL
CMGetInfo(DWORD dwInfo);
00118
00119
HCTMTRANSFORM _loadds
FAR PASCAL
CMCreateTransform(LPLOGCOLORSPACE lpCS,
00120 LPSTR lpDevCh, LPSTR lpTargetDevCh);
00121
00122
BOOL _loadds
FAR PASCAL
CMDeleteTransform(HCTMTRANSFORM hTransform);
00123
00124
BOOL _loadds
FAR PASCAL
CMTranslateRGB(HCTMTRANSFORM hTransform,RGBQUAD RGBQuad,
00125 LPVOID lpResult, DWORD dwFlags);
00126
00127
BOOL _loadds
FAR PASCAL
CMTranslateRGBs(HCTMTRANSFORM hTransform,
00128 LPVOID lpSrc, DWORD dwSrcFlags,
00129 DWORD nSrcWidth, DWORD nSrcHeight, DWORD nSrcStride,
00130 LPVOID lpDest, DWORD dwDestFlags, DWORD dwFlags);
00131
00132
BOOL _loadds
FAR PASCAL
CMCheckColorsInGamut(HCTMTRANSFORM hTransform,
00133 LPVOID lpSrc,
00134 LPVOID lpDest, DWORD dwCount);
00135
BOOL _loadds
FAR PASCAL
CMGetPS2ColorSpaceArray(
00136 LPSTR lpProfileName,
00137 DWORD InputIntent,
00138 WORD InpDrvClrSp,
00139 MEMPTR lpBuffer,
00140 LPDWORD lpcbSize,
00141 BOOL AllowBinary);
00142
00143
BOOL _loadds
FAR PASCAL
CMGetPS2ColorRenderingDictionary(
00144 LPSTR lpProfileName,
00145 DWORD Intent,
00146 MEMPTR lpMem,
00147 LPDWORD lpcbSize,
00148 BOOL AllowBinary);
00149
00150
BOOL _loadds
FAR PASCAL
CMGetPS2ColorRenderingIntent(
00151 LPSTR lpProfileName,
00152 DWORD Intent,
00153 MEMPTR lpMem,
00154 LPDWORD lpcbSize);
00155
00156
00157
HCTMTRANSFORM _loadds
FAR PASCAL
ICMCreateTransform(LPLOGCOLORSPACE lpCS,
00158 LPSTR lpDevCh, LPSTR lpTargetDevCh);
00159
00160
BOOL _loadds
FAR PASCAL
ICMDeleteTransform(HCTMTRANSFORM hTransform);
00161
00162
BOOL _loadds
FAR PASCAL
ICMTranslateRGB(HCTMTRANSFORM hTransform, RGBQUAD RGBQuad,
00163 LPVOID lpResult, DWORD dwFlags);
00164
00165
BOOL _loadds
FAR PASCAL
ICMTranslateRGBs(HCTMTRANSFORM hTransform,
00166 LPVOID lpSrc, DWORD dwSrcFlags,
00167 DWORD nSrcWidth, DWORD nSrcHeight, DWORD nSrcStride,
00168 LPVOID lpDest, DWORD dwDestFlags, DWORD dwFlags);
00169
00170
BOOL _loadds
FAR PASCAL
ICMCheckColorsInGamut(HCTMTRANSFORM hTransform,
00171 LPVOID lpSrc,
00172 LPVOID lpDest, DWORD dwCount);
00173
00174
HCTMTRANSFORM _loadds
FAR PASCAL
CreateDefTransform (LPVOID lppd);
00175
BOOL _loadds
FAR PASCAL
DeleteDefTransform (HCTMTRANSFORM hTransform);
00176
#endif
00177