📄 icm.h
字号:
//
typedef DWORD TAGTYPE;
typedef TAGTYPE *PTAGTYPE, *LPTAGTYPE;
//
// Profile enumeration data structure
//
#define ENUM_TYPE_VERSION 0x0200
typedef struct tagENUMTYPEA {
DWORD dwSize; // structure size
DWORD dwVersion; // structure version
DWORD dwFields; // bit fields
PCSTR pDeviceName; // device friendly name
DWORD dwMediaType; // media type
DWORD dwDitheringMode; // dithering mode
DWORD dwResolution[2]; // x and y resolutions
DWORD dwCMMType; // cmm ID
DWORD dwClass; // profile class
DWORD dwDataColorSpace; // color space of data
DWORD dwConnectionSpace; // pcs
DWORD dwSignature; // magic number
DWORD dwPlatform; // primary platform
DWORD dwProfileFlags; // various bit settings in profile
DWORD dwManufacturer; // manufacturer ID
DWORD dwModel; // model ID
DWORD dwAttributes[2]; // device attributes
DWORD dwRenderingIntent; // rendering intent
DWORD dwCreator; // profile creator
} ENUMTYPEA, *PENUMTYPEA, *LPENUMTYPEA;
typedef struct tagENUMTYPEW {
DWORD dwSize; // structure size
DWORD dwVersion; // structure version
DWORD dwFields; // bit fields
PCWSTR pDeviceName; // device friendly name
DWORD dwMediaType; // media type
DWORD dwDitheringMode; // dithering mode
DWORD dwResolution[2]; // x and y resolutions
DWORD dwCMMType; // cmm ID
DWORD dwClass; // profile class
DWORD dwDataColorSpace; // color space of data
DWORD dwConnectionSpace; // pcs
DWORD dwSignature; // magic number
DWORD dwPlatform; // primary platform
DWORD dwProfileFlags; // various bit settings in profile
DWORD dwManufacturer; // manufacturer ID
DWORD dwModel; // model ID
DWORD dwAttributes[2]; // device attributes
DWORD dwRenderingIntent; // rendering intent
DWORD dwCreator; // profile creator
} ENUMTYPEW, *PENUMTYPEW, *LPENUMTYPEW;
//
// Bitfields for enumeration record above
//
#define ET_DEVICENAME 0x00000001
#define ET_MEDIATYPE 0x00000002
#define ET_DITHERMODE 0x00000004
#define ET_RESOLUTION 0x00000008
#define ET_CMMTYPE 0x00000010
#define ET_CLASS 0x00000020
#define ET_DATACOLORSPACE 0x00000040
#define ET_CONNECTIONSPACE 0x00000080
#define ET_SIGNATURE 0x00000100
#define ET_PLATFORM 0x00000200
#define ET_PROFILEFLAGS 0x00000400
#define ET_MANUFACTURER 0x00000800
#define ET_MODEL 0x00001000
#define ET_ATTRIBUTES 0x00002000
#define ET_RENDERINGINTENT 0x00004000
#define ET_CREATOR 0x00008000
//
// Flags for creating color transforms
//
#define PROOF_MODE 0x00000001
#define NORMAL_MODE 0x00000002
#define BEST_MODE 0x00000003
#define ENABLE_GAMUT_CHECKING 0x00010000
#define USE_RELATIVE_COLORIMETRIC 0x00020000
#define FAST_TRANSLATE 0x00040000
#define RESERVED 0x80000000
//
// Paremeter for GetPS2ColorSpaceArray
//
#define CSA_A 1
#define CSA_ABC 2
#define CSA_DEF 3
#define CSA_DEFG 4
#define CSA_GRAY 5
#define CSA_RGB 6
#define CSA_CMYK 7
#define CSA_Lab 8
//
// Parameter for CMGetInfo()
//
#define CMM_WIN_VERSION 0
#define CMM_IDENT 1
#define CMM_DRIVER_VERSION 2
#define CMM_DLL_VERSION 3
#define CMM_VERSION 4
#define CMM_DESCRIPTION 5
#define CMM_LOGOICON 6
//
// Parameter for CMTranslateRGBs()
//
#define CMS_FORWARD 0
#define CMS_BACKWARD 1
//
// Constants for SetupColorMatching()
//
#define COLOR_MATCH_VERSION 0x0200
//
// Constants for flags
//
#define CMS_DISABLEICM 1 // Disable color matching
#define CMS_ENABLEPROOFING 2 // Enable proofing
#define CMS_SETRENDERINTENT 4 // Use passed in value
#define CMS_SETPROOFINTENT 8
#define CMS_SETMONITORPROFILE 0x10 // Use passed in profile name initially
#define CMS_SETPRINTERPROFILE 0x20
#define CMS_SETTARGETPROFILE 0x40
#define CMS_USEHOOK 0x80 // Use hook procedure in lpfnHook
#define CMS_USEAPPLYCALLBACK 0x100 // Use callback procedure when applied
//
// Used to denote too-small buffers (output only)
//
#define CMS_MONITOROVERFLOW 0x80000000L
#define CMS_PRINTEROVERFLOW 0x40000000L
#define CMS_TARGETOVERFLOW 0x20000000L
//
// Structures (both ANSI and Unicode)
//
struct _tagCOLORMATCHSETUPW;
struct _tagCOLORMATCHSETUPA;
typedef BOOL (WINAPI *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW *,LPARAM);
typedef BOOL (WINAPI *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA *,LPARAM);
typedef struct _tagCOLORMATCHSETUPW {
DWORD dwSize; // Size of structure in bytes
DWORD dwVersion; // Set to COLOR_MATCH_VERSION
DWORD dwFlags; // See constants listed previously
HWND hwndOwner; // Window handle of owner
PCWSTR pSourceName; // Name of Image Source, defaults to "sRGB Color Space"
PCWSTR pDisplayName; // If null, defaults to first enumerated monitor
PCWSTR pPrinterName; // If null, defaults to default printer.
DWORD dwRenderIntent; // Rendering Intent
DWORD dwProofingIntent; // Rendering Intent for Proofing
PWSTR pMonitorProfile; // Monitor profile name
DWORD ccMonitorProfile; // Size of above in characters
PWSTR pPrinterProfile; // Printer profile name
DWORD ccPrinterProfile; // Size of above in characters
PWSTR pTargetProfile; // Target profile name
DWORD ccTargetProfile; // Size of above in characters
DLGPROC lpfnHook; // Hook Procedure address
LPARAM lParam; // Given to hook procedure at WM_INITDIALOG
PCMSCALLBACKW lpfnApplyCallback; // Callback Procedure address when apply is pushed
LPARAM lParamApplyCallback; // Given to callback Procedure for apply
} COLORMATCHSETUPW, *PCOLORMATCHSETUPW, *LPCOLORMATCHSETUPW;
typedef struct _tagCOLORMATCHSETUPA {
DWORD dwSize; // Size of structure in bytes
DWORD dwVersion; // Set to COLOR_MATCH_VERSION
DWORD dwFlags; // See constants listed previously
HWND hwndOwner; // Window handle of owner
PCSTR pSourceName; // Name of Image Source, defaults to "This Document"
PCSTR pDisplayName; // If null, defaults to first enumerated monitor
PCSTR pPrinterName; // If null, defaults to default printer.
DWORD dwRenderIntent; // Rendering Intent
DWORD dwProofingIntent; // Rendering Intent for Proofing
PSTR pMonitorProfile; // Monitor profile name
DWORD ccMonitorProfile; // Size of above in characters
PSTR pPrinterProfile; // Printer profile name
DWORD ccPrinterProfile; // Size of above in characters
PSTR pTargetProfile; // Target profile name
DWORD ccTargetProfile; // Size of above in characters
DLGPROC lpfnHook; // Hook Procedure address
LPARAM lParam; // Given to hook procedure at WM_INITDIALOG
PCMSCALLBACKA lpfnApplyCallback; // Callback Procedure address when apply is pushed
LPARAM lParamApplyCallback; // Given to callback Procedure for apply
} COLORMATCHSETUPA, *PCOLORMATCHSETUPA, *LPCOLORMATCHSETUPA;
//
// Windows API definitions
//
HPROFILE WINAPI OpenColorProfileA(PPROFILE, DWORD, DWORD, DWORD);
HPROFILE WINAPI OpenColorProfileW(PPROFILE, DWORD, DWORD, DWORD);
BOOL WINAPI CloseColorProfile(HPROFILE);
BOOL WINAPI GetColorProfileFromHandle(HPROFILE, PBYTE, PDWORD);
BOOL WINAPI IsColorProfileValid(HPROFILE, PBOOL);
BOOL WINAPI CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA, PBYTE*);
BOOL WINAPI CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW, PBYTE*);
BOOL WINAPI GetCountColorProfileElements(HPROFILE, PDWORD);
BOOL WINAPI GetColorProfileHeader(HPROFILE, PPROFILEHEADER);
BOOL WINAPI GetColorProfileElementTag(HPROFILE, DWORD, PTAGTYPE);
BOOL WINAPI IsColorProfileTagPresent(HPROFILE, TAGTYPE, PBOOL);
BOOL WINAPI GetColorProfileElement(HPROFILE, TAGTYPE, DWORD, PDWORD, PVOID, PBOOL);
BOOL WINAPI SetColorProfileHeader(HPROFILE, PPROFILEHEADER);
BOOL WINAPI SetColorProfileElementSize(HPROFILE, TAGTYPE, DWORD);
BOOL WINAPI SetColorProfileElement(HPROFILE, TAGTYPE, DWORD, PDWORD, PVOID);
BOOL WINAPI SetColorProfileElementReference(HPROFILE, TAGTYPE, TAGTYPE);
BOOL WINAPI GetPS2ColorSpaceArray (HPROFILE, DWORD, DWORD, PBYTE, PDWORD, PBOOL);
BOOL WINAPI GetPS2ColorRenderingIntent(HPROFILE, DWORD, PBYTE, PDWORD);
BOOL WINAPI GetPS2ColorRenderingDictionary(HPROFILE, DWORD, PBYTE, PDWORD, PBOOL);
BOOL WINAPI GetNamedProfileInfo(HPROFILE, PNAMED_PROFILE_INFO);
BOOL WINAPI ConvertColorNameToIndex(HPROFILE, PCOLOR_NAME, PDWORD, DWORD);
BOOL WINAPI ConvertIndexToColorName(HPROFILE, PDWORD, PCOLOR_NAME, DWORD);
BOOL WINAPI CreateDeviceLinkProfile(PHPROFILE, DWORD, PDWORD, DWORD, DWORD, PBYTE*, DWORD);
HTRANSFORM WINAPI CreateColorTransformA(LPLOGCOLORSPACEA, HPROFILE, HPROFILE, DWORD);
HTRANSFORM WINAPI CreateColorTransformW(LPLOGCOLORSPACEW, HPROFILE, HPROFILE, DWORD);
HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE, DWORD, PDWORD, DWORD, DWORD, DWORD);
BOOL WINAPI DeleteColorTransform(HTRANSFORM);
BOOL WINAPI TranslateBitmapBits(HTRANSFORM, PVOID, BMFORMAT, DWORD, DWORD, DWORD, PVOID, BMFORMAT, DWORD, PBMCALLBACKFN, ULONG);
BOOL WINAPI CheckBitmapBits(HTRANSFORM , PVOID, BMFORMAT, DWORD, DWORD, DWORD, PBYTE, PBMCALLBACKFN, ULONG);
BOOL WINAPI TranslateColors(HTRANSFORM, PCOLOR, DWORD, COLORTYPE, PCOLOR, COLORTYPE);
BOOL WINAPI CheckColors(HTRANSFORM, PCOLOR, DWORD, COLORTYPE, PBYTE);
DWORD WINAPI GetCMMInfo(HTRANSFORM, DWORD);
BOOL WINAPI RegisterCMMA(PCSTR, DWORD, PCSTR);
BOOL WINAPI RegisterCMMW(PCWSTR, DWORD, PCWSTR);
BOOL WINAPI UnregisterCMMA(PCSTR, DWORD);
BOOL WINAPI UnregisterCMMW(PCWSTR, DWORD);
BOOL WINAPI SelectCMM(DWORD);
BOOL WINAPI GetColorDirectoryA(PCSTR, PSTR, PDWORD);
BOOL WINAPI GetColorDirectoryW(PCWSTR, PWSTR, PDWORD);
BOOL WINAPI InstallColorProfileA(PCSTR, PCSTR);
BOOL WINAPI InstallColorProfileW(PCWSTR, PCWSTR);
BOOL WINAPI UninstallColorProfileA(PCSTR, PCSTR, BOOL);
BOOL WINAPI UninstallColorProfileW(PCWSTR, PCWSTR, BOOL);
BOOL WINAPI EnumColorProfilesA(PCSTR, PENUMTYPEA, PBYTE, PDWORD, PDWORD);
BOOL WINAPI EnumColorProfilesW(PCWSTR, PENUMTYPEW, PBYTE, PDWORD, PDWORD);
BOOL WINAPI SetStandardColorSpaceProfileA(PCSTR, DWORD, PCSTR);
BOOL WINAPI SetStandardColorSpaceProfileW(PCWSTR, DWORD, PCWSTR);
BOOL WINAPI GetStandardColorSpaceProfileA(PCSTR, DWORD, PSTR, PDWORD);
BOOL WINAPI GetStandardColorSpaceProfileW(PCWSTR, DWORD, PWSTR, PDWORD);
BOOL WINAPI AssociateColorProfileWithDeviceA(PCSTR, PCSTR, PCSTR);
BOOL WINAPI AssociateColorProfileWithDeviceW(PCWSTR, PCWSTR, PCWSTR);
BOOL WINAPI DisassociateColorProfileFromDeviceA(PCSTR, PCSTR, PCSTR);
BOOL WINAPI DisassociateColorProfileFromDeviceW(PCWSTR, PCWSTR, PCWSTR);
BOOL WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW pcms);
BOOL WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA pcms);
#ifdef UNICODE
#define ENUMTYPE ENUMTYPEW
#define PENUMTYPE PENUMTYPEW
#define COLORMATCHSETUP COLORMATCHSETUPW
#define PCOLORMATCHSETUP PCOLORMATCHSETUPW
#define LPCOLORMATCHSETUP LPCOLORMATCHSETUPW
#define PCMSCALLBACK PCMSCALLBACKW
#define CreateColorTransform CreateColorTransformW
#define OpenColorProfile OpenColorProfileW
#define CreateProfileFromLogColorSpace CreateProfileFromLogColorSpaceW
#define RegisterCMM RegisterCMMW
#define UnregisterCMM UnregisterCMMW
#define GetColorDirectory GetColorDirectoryW
#define InstallColorProfile InstallColorProfileW
#define UninstallColorProfile UninstallColorProfileW
#define AssociateColorProfileWithDevice AssociateColorProfileWithDeviceW
#define DisassociateColorProfileFromDevice DisassociateColorProfileFromDeviceW
#define EnumColorProfiles EnumColorProfilesW
#define SetStandardColorSpaceProfile SetStandardColorSpaceProfileW
#define GetStandardColorSpaceProfile GetStandardColorSpaceProfileW
#define SetupColorMatching SetupColorMatchingW
#else
#define ENUMTYPE ENUMTYPEA
#define PENUMTYPE PENUMTYPEA
#define COLORMATCHSETUP COLORMATCHSETUPA
#define PCOLORMATCHSETUP PCOLORMATCHSETUPA
#define LPCOLORMATCHSETUP LPCOLORMATCHSETUPA
#define PCMSCALLBACK PCMSCALLBACKA
#define CreateColorTransform CreateColorTransformA
#define OpenColorProfile OpenColorProfileA
#define CreateProfileFromLogColorSpace CreateProfileFromLogColorSpaceA
#define RegisterCMM RegisterCMMA
#define UnregisterCMM UnregisterCMMA
#define GetColorDirectory GetColorDirectoryA
#define InstallColorProfile InstallColorProfileA
#define UninstallColorProfile UninstallColorProfileA
#define AssociateColorProfileWithDevice AssociateColorProfileWithDeviceA
#define DisassociateColorProfileFromDevice DisassociateColorProfileFromDeviceA
#define EnumColorProfiles EnumColorProfilesA
#define SetStandardColorSpaceProfile SetStandardColorSpaceProfileA
#define GetStandardColorSpaceProfile GetStandardColorSpaceProfileA
#define SetupColorMatching SetupColorMatchingA
#endif // !UNICODE
#ifdef __cplusplus
}
#endif
#endif // ifndef _ICM_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -