📄 icm.h
字号:
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, LPARAM);
BOOL WINAPI CheckBitmapBits(HTRANSFORM , PVOID, BMFORMAT, DWORD, DWORD, DWORD, PBYTE, PBMCALLBACKFN, LPARAM);
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
//
// Transform returned by CMM
//
typedef HANDLE HCMTRANSFORM;
//
// Pointer to ICC color profile data.
//
typedef PVOID LPDEVCHARACTER;
//
// CMM API definition
//
BOOL WINAPI CMCheckColors(
HCMTRANSFORM hcmTransform, // transform handle
LPCOLOR lpaInputColors, // array of COLORs
DWORD nColors, // COLOR array size
COLORTYPE ctInput, // input color type
LPBYTE lpaResult // buffer for results
);
BOOL WINAPI CMCheckColorsInGamut(
HCMTRANSFORM hcmTransform, // transform handle
RGBTRIPLE *lpaRGBTriple, // RGB triple array
LPBYTE lpaResult, // buffer for results
UINT nCount // result buffer size
);
BOOL WINAPI CMCheckRGBs(
HCMTRANSFORM hcmTransform, // transform handle
LPVOID lpSrcBits, // source bitmap bits
BMFORMAT bmInput, // source bitmap format
DWORD dwWidth, // source bitmap width
DWORD dwHeight, // source bitmap hight
DWORD dwStride, // source bitmap delta
LPBYTE lpaResult, // buffer for results
PBMCALLBACKFN pfnCallback, // pointer to callback function
LPARAM ulCallbackData // caller-defined parameter to callback
);
BOOL WINAPI CMConvertColorNameToIndex(
HPROFILE hProfile,
PCOLOR_NAME paColorName,
PDWORD paIndex,
DWORD dwCount
);
BOOL WINAPI CMConvertIndexToColorName(
HPROFILE hProfile,
PDWORD paIndex,
PCOLOR_NAME paColorName,
DWORD dwCount
);
BOOL WINAPI CMCreateDeviceLinkProfile(
PHPROFILE pahProfiles, // array of profile handles
DWORD nProfiles, // profile handle array size
PDWORD padwIntents, // array of rendering intents
DWORD nIntents, // intent array size
DWORD dwFlags, // transform creation flags
LPBYTE *lpProfileData // pointer to pointer to buffer
);
HCMTRANSFORM WINAPI CMCreateMultiProfileTransform(
PHPROFILE pahProfiles, // array of profile handles
DWORD nProfiles, // profile handle array size
PDWORD padwIntents, // array of rendering intents
DWORD nIntents, // intent array size
DWORD dwFlags // transform creation flags
);
BOOL WINAPI CMCreateProfile(
LPLOGCOLORSPACEA lpColorSpace, // pointer to a logical color space
LPDEVCHARACTER *lpProfileData // pointer to pointer to buffer
);
BOOL WINAPI CMCreateProfileW(
LPLOGCOLORSPACEW lpColorSpace, // pointer to a logical color space
LPDEVCHARACTER *lpProfileData // pointer to pointer to buffer
);
HCMTRANSFORM WINAPI CMCreateTransform(
LPLOGCOLORSPACEA lpColorSpace, // pointer to logical color space
LPDEVCHARACTER lpDevCharacter, // profile data
LPDEVCHARACTER lpTargetDevCharacter // target profile data
);
HCMTRANSFORM WINAPI CMCreateTransformW(
LPLOGCOLORSPACEW lpColorSpace, // pointer to logical color space
LPDEVCHARACTER lpDevCharacter, // profile data
LPDEVCHARACTER lpTargetDevCharacter // target profile data
);
HCMTRANSFORM WINAPI CMCreateTransformExt(
LPLOGCOLORSPACEA lpColorSpace, // pointer to logical color space
LPDEVCHARACTER lpDevCharacter, // profile data
LPDEVCHARACTER lpTargetDevCharacter, // target profile data
DWORD dwFlags // creation flags
);
HCMTRANSFORM WINAPI CMCreateTransformExtW(
LPLOGCOLORSPACEW lpColorSpace, // pointer to logical color space
LPDEVCHARACTER lpDevCharacter, // profile data
LPDEVCHARACTER lpTargetDevCharacter, // target profile data
DWORD dwFlags // creation flags
);
BOOL WINAPI CMDeleteTransform(
HCMTRANSFORM hcmTransform // transform handle to be deleted.
);
DWORD WINAPI CMGetInfo(
DWORD dwInfo
);
BOOL WINAPI CMGetNamedProfileInfo(
HPROFILE hProfile, // profile handle
PNAMED_PROFILE_INFO pNamedProfileInfo // pointer to named profile info
);
BOOL WINAPI CMGetPS2ColorRenderingDictionary(
HPROFILE hProfile,
DWORD dwIntent,
LPBYTE lpBuffer,
LPDWORD lpcbSize,
LPBOOL lpbBinary
);
BOOL WINAPI CMGetPS2ColorRenderingIntent(
HPROFILE hProfile,
DWORD dwIntent,
LPBYTE lpBuffer,
LPDWORD lpcbSize
);
BOOL WINAPI CMGetPS2ColorSpaceArray(
HPROFILE hProfile,
DWORD dwIntent,
DWORD dwCSAType,
LPBYTE lpBuffer,
LPDWORD lpcbSize,
LPBOOL lpbBinary
);
BOOL WINAPI CMIsProfileValid(
HPROFILE hProfile, // proflle handle
LPBOOL lpbValid // buffer for result.
);
BOOL WINAPI CMTranslateColors(
HCMTRANSFORM hcmTransform, // transform handle
LPCOLOR lpaInputColors, // pointer to input color array
DWORD nColors, // number of color in color array
COLORTYPE ctInput, // input color type
LPCOLOR lpaOutputColors, // pointer to output color array
COLORTYPE ctOutput // output color type
);
BOOL WINAPI CMTranslateRGB(
HCMTRANSFORM hcmTransform,
COLORREF ColorRef,
LPCOLORREF lpColorRef,
DWORD dwFlags
);
BOOL WINAPI CMTranslateRGBs(
HCMTRANSFORM hcmTransform,
LPVOID lpSrcBits,
BMFORMAT bmInput,
DWORD dwWidth,
DWORD dwHeight,
DWORD dwStride,
LPVOID lpDestBits,
BMFORMAT bmOutput,
DWORD dwTranslateDirection
);
BOOL WINAPI CMTranslateRGBsExt(
HCMTRANSFORM hcmTransform,
LPVOID lpSrcBits,
BMFORMAT bmInput,
DWORD dwWidth,
DWORD dwHeight,
DWORD dwInputStride,
LPVOID lpDestBits,
BMFORMAT bmOutput,
DWORD dwOutputStride,
LPBMCALLBACKFN lpfnCallback,
LPARAM ulCallbackData
);
#ifdef __cplusplus
}
#endif
#pragma option pop /*P_O_Pop*/
#endif // ifndef _ICM_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -