Lines Matching refs:hProfile

62 cmsBool SetTextTags(cmsHPROFILE hProfile, const wchar_t* Description)
66 cmsContext ContextID = cmsGetProfileContextID(hProfile);
76 if (!cmsWriteTag(hProfile, cmsSigProfileDescriptionTag, DescriptionMLU)) goto Error;
77 if (!cmsWriteTag(hProfile, cmsSigCopyrightTag, CopyrightMLU)) goto Error;
92 cmsBool SetSeqDescTag(cmsHPROFILE hProfile, const char* Model)
95 cmsContext ContextID = cmsGetProfileContextID(hProfile);
115 if (!_cmsWriteProfileSequence(hProfile, Seq)) goto Error;
505 cmsHPROFILE hProfile;
508 hProfile = cmsCreateRGBProfileTHR(ContextID, WhitePoint == NULL ? cmsD50_xyY() : WhitePoint, NULL, NULL);
509 if (hProfile == NULL) return NULL;
511 cmsSetProfileVersion(hProfile, 2.1);
513 cmsSetDeviceClass(hProfile, cmsSigAbstractClass);
514 cmsSetColorSpace(hProfile, cmsSigLabData);
515 cmsSetPCS(hProfile, cmsSigLabData);
517 if (!SetTextTags(hProfile, L"Lab identity built-in")) return NULL;
526 if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error;
529 return hProfile;
536 if (hProfile != NULL)
537 cmsCloseProfile(hProfile);
552 cmsHPROFILE hProfile;
555 hProfile = cmsCreateRGBProfileTHR(ContextID, WhitePoint == NULL ? cmsD50_xyY() : WhitePoint, NULL, NULL);
556 if (hProfile == NULL) return NULL;
558 cmsSetProfileVersion(hProfile, 4.3);
560 cmsSetDeviceClass(hProfile, cmsSigAbstractClass);
561 cmsSetColorSpace(hProfile, cmsSigLabData);
562 cmsSetPCS(hProfile, cmsSigLabData);
564 if (!SetTextTags(hProfile, L"Lab identity built-in")) goto Error;
573 if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error;
576 return hProfile;
583 if (hProfile != NULL)
584 cmsCloseProfile(hProfile);
598 cmsHPROFILE hProfile;
601 hProfile = cmsCreateRGBProfileTHR(ContextID, cmsD50_xyY(), NULL, NULL);
602 if (hProfile == NULL) return NULL;
604 cmsSetProfileVersion(hProfile, 4.3);
606 cmsSetDeviceClass(hProfile, cmsSigAbstractClass);
607 cmsSetColorSpace(hProfile, cmsSigXYZData);
608 cmsSetPCS(hProfile, cmsSigXYZData);
610 if (!SetTextTags(hProfile, L"XYZ identity built-in")) goto Error;
619 if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error;
622 return hProfile;
629 if (hProfile != NULL)
630 cmsCloseProfile(hProfile);
859 cmsHPROFILE hProfile;
865 hProfile = cmsCreateProfilePlaceholder(ContextID);
866 if (!hProfile) // can't allocate
869 cmsSetProfileVersion(hProfile, 4.3);
871 if (!SetTextTags(hProfile, L"NULL profile built-in")) goto Error;
875 cmsSetDeviceClass(hProfile, cmsSigOutputClass);
876 cmsSetColorSpace(hProfile, cmsSigGrayData);
877 cmsSetPCS(hProfile, cmsSigLabData);
890 if (!cmsWriteTag(hProfile, cmsSigBToA0Tag, (void*) LUT)) goto Error;
891 if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, cmsD50_XYZ())) goto Error;
894 return hProfile;
901 if (hProfile != NULL)
902 cmsCloseProfile(hProfile);
922 void FixColorSpaces(cmsHPROFILE hProfile,
931 cmsSetDeviceClass(hProfile, cmsSigAbstractClass);
932 cmsSetColorSpace(hProfile, ColorSpace);
933 cmsSetPCS(hProfile, PCS);
939 cmsSetDeviceClass(hProfile, cmsSigOutputClass);
940 cmsSetPCS(hProfile, ColorSpace);
941 cmsSetColorSpace(hProfile, PCS);
947 cmsSetDeviceClass(hProfile, cmsSigInputClass);
948 cmsSetColorSpace(hProfile, ColorSpace);
949 cmsSetPCS(hProfile, PCS);
954 cmsSetDeviceClass(hProfile, cmsSigLinkClass);
955 cmsSetColorSpace(hProfile, ColorSpace);
956 cmsSetPCS(hProfile, PCS);
1085 cmsHPROFILE hProfile = NULL;
1128 hProfile = cmsCreateProfilePlaceholder(ContextID);
1129 if (!hProfile) goto Error; // can't allocate
1131 cmsSetProfileVersion(hProfile, Version);
1133 FixColorSpaces(hProfile, xform -> EntryColorSpace, xform -> ExitColorSpace, dwFlags);
1146 deviceClass = cmsGetDeviceClass(hProfile);
1200 if (!SetTextTags(hProfile, L"devicelink")) goto Error;
1203 if (!cmsWriteTag(hProfile, DestinationTag, LUT)) goto Error;
1207 if (!cmsWriteTag(hProfile, cmsSigColorantTableTag, xform->InputColorant)) goto Error;
1211 if (!cmsWriteTag(hProfile, cmsSigColorantTableOutTag, xform->OutputColorant)) goto Error;
1215 if (!_cmsWriteProfileSequence(hProfile, xform ->Sequence)) goto Error;
1220 if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->EntryWhitePoint)) goto Error;
1223 if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->ExitWhitePoint)) goto Error;
1228 cmsSetHeaderRenderingIntent(hProfile, xform ->RenderingIntent);
1231 return hProfile;
1235 cmsCloseProfile(hProfile);