Home | History | Annotate | Download | only in src

Lines Matching refs:hProfile

64 cmsBool  _cmsReadMediaWhitePoint(cmsCIEXYZ* Dest, cmsHPROFILE hProfile)
70 Tag = (cmsCIEXYZ*) cmsReadTag(hProfile, cmsSigMediaWhitePointTag);
79 if (cmsGetEncodedICCversion(hProfile) < 0x4000000) {
81 if (cmsGetDeviceClass(hProfile) == cmsSigDisplayClass) {
94 cmsBool _cmsReadCHAD(cmsMAT3* Dest, cmsHPROFILE hProfile)
100 Tag = (cmsMAT3*) cmsReadTag(hProfile, cmsSigChromaticAdaptationTag);
111 if (cmsGetEncodedICCversion(hProfile) < 0x4000000) {
113 if (cmsGetDeviceClass(hProfile) == cmsSigDisplayClass) {
115 cmsCIEXYZ* White = (cmsCIEXYZ*) cmsReadTag(hProfile, cmsSigMediaWhitePointTag);
133 cmsBool ReadICCMatrixRGB2XYZ(cmsMAT3* r, cmsHPROFILE hProfile)
139 PtrRed = (cmsCIEXYZ *) cmsReadTag(hProfile, cmsSigRedColorantTag);
140 PtrGreen = (cmsCIEXYZ *) cmsReadTag(hProfile, cmsSigGreenColorantTag);
141 PtrBlue = (cmsCIEXYZ *) cmsReadTag(hProfile, cmsSigBlueColorantTag);
156 cmsPipeline* BuildGrayInputMatrixPipeline(cmsHPROFILE hProfile)
160 cmsContext ContextID = cmsGetProfileContextID(hProfile);
162 GrayTRC = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigGrayTRCTag);
169 if (cmsGetPCS(hProfile) == cmsSigLabData) {
205 // memory pointed by GrayTRC will be freed when hProfile is closed.
215 cmsPipeline* BuildRGBInputMatrixShaper(cmsHPROFILE hProfile)
220 cmsContext ContextID = cmsGetProfileContextID(hProfile);
223 if (!ReadICCMatrixRGB2XYZ(&Mat, hProfile)) return NULL;
234 Shapes[0] = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigRedTRCTag);
235 Shapes[1] = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigGreenTRCTag);
236 Shapes[2] = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigBlueTRCTag);
251 if (cmsGetPCS(hProfile) == cmsSigLabData) {
270 cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
272 cmsContext ContextID = cmsGetProfileContextID(hProfile);
273 cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
274 cmsColorSpaceSignature spc = cmsGetColorSpace(hProfile);
275 cmsColorSpaceSignature PCS = cmsGetPCS(hProfile);
314 cmsPipeline* _cmsReadInputLUT(cmsHPROFILE hProfile, int Intent)
319 cmsContext ContextID = cmsGetProfileContextID(hProfile);
322 if (cmsGetDeviceClass(hProfile) == cmsSigNamedColorClass) {
325 cmsNAMEDCOLORLIST* nc = (cmsNAMEDCOLORLIST*) cmsReadTag(hProfile, cmsSigNamedColor2Tag);
347 if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
351 return _cmsReadFloatInputTag(hProfile, tagFloat);
355 if (!cmsIsTag(hProfile, tag16)) {
359 if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
364 cmsPipeline* Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
368 OriginalType = _cmsGetTagTrueType(hProfile, tag16);
374 if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData)
378 if (cmsGetColorSpace(hProfile) == cmsSigLabData &&
396 if (cmsGetColorSpace(hProfile) == cmsSigGrayData) {
400 return BuildGrayInputMatrixPipeline(hProfile);
404 return BuildRGBInputMatrixShaper(hProfile);
415 cmsPipeline* BuildGrayOutputPipeline(cmsHPROFILE hProfile)
419 cmsContext ContextID = cmsGetProfileContextID(hProfile);
421 GrayTRC = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigGrayTRCTag);
433 if (cmsGetPCS(hProfile) == cmsSigLabData) {
457 cmsPipeline* BuildRGBOutputMatrixShaper(cmsHPROFILE hProfile)
463 hProfile);
465 if (!ReadICCMatrixRGB2XYZ(&Mat, hProfile))
479 Shapes[0] = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigRedTRCTag);
480 Shapes[1] = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigGreenTRCTag);
481 Shapes[2] = (cmsToneCurve *) cmsReadTag(hProfile, cmsSigBlueTRCTag);
500 if (cmsGetPCS(hProfile) == cmsSigLabData) {
543 cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
545 cmsContext ContextID = cmsGetProfileContextID(hProfile);
546 cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
547 cmsColorSpaceSignature PCS = cmsGetPCS(hProfile);
548 cmsColorSpaceSignature dataSpace = cmsGetColorSpace(hProfile);
586 cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent)
591 cmsContext ContextID = cmsGetProfileContextID(hProfile);
596 if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
599 return _cmsReadFloatOutputTag(hProfile, tagFloat);
603 if (!cmsIsTag(hProfile, tag16)) {
607 if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
612 cmsPipeline* Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
616 OriginalType = _cmsGetTagTrueType(hProfile, tag16);
624 if (cmsGetPCS(hProfile) == cmsSigLabData)
628 if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData)
636 if (cmsGetColorSpace(hProfile) == cmsSigLabData)
650 if (cmsGetColorSpace(hProfile) == cmsSigGrayData) {
654 return BuildGrayOutputPipeline(hProfile);
658 return BuildRGBOutputMatrixShaper(hProfile);
665 cmsPipeline* _cmsReadFloatDevicelinkTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
667 cmsContext ContextID = cmsGetProfileContextID(hProfile);
668 cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
669 cmsColorSpaceSignature PCS = cmsGetPCS(hProfile);
670 cmsColorSpaceSignature spc = cmsGetColorSpace(hProfile);
706 cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent)
712 cmsContext ContextID = cmsGetProfileContextID(hProfile);
716 if (cmsGetDeviceClass(hProfile) == cmsSigNamedColorClass) {
718 cmsNAMEDCOLORLIST* nc = (cmsNAMEDCOLORLIST*) cmsReadTag(hProfile, cmsSigNamedColor2Tag);
729 if (cmsGetColorSpace(hProfile) == cmsSigLabData)
740 if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
743 return _cmsReadFloatDevicelinkTag(hProfile, tagFloat);
747 if (cmsIsTag(hProfile, tagFloat)) {
749 return cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
752 if (!cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
755 if (!cmsIsTag(hProfile, tag16)) return NULL;
761 Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
770 if (cmsGetPCS(hProfile) == cmsSigLabData)
774 OriginalType = _cmsGetTagTrueType(hProfile, tag16);
781 if (cmsGetColorSpace(hProfile) == cmsSigLabData) {
786 if (cmsGetPCS(hProfile) == cmsSigLabData) {
801 cmsBool CMSEXPORT cmsIsMatrixShaper(cmsHPROFILE hProfile)
803 switch (cmsGetColorSpace(hProfile)) {
807 return cmsIsTag(hProfile, cmsSigGrayTRCTag);
811 return (cmsIsTag(hProfile, cmsSigRedColorantTag) &&
812 cmsIsTag(hProfile, cmsSigGreenColorantTag) &&
813 cmsIsTag(hProfile, cmsSigBlueColorantTag) &&
814 cmsIsTag(hProfile, cmsSigRedTRCTag) &&
815 cmsIsTag(hProfile, cmsSigGreenTRCTag) &&
816 cmsIsTag(hProfile, cmsSigBlueTRCTag));
825 cmsBool CMSEXPORT cmsIsCLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number UsedDirection)
830 if (cmsGetDeviceClass(hProfile) == cmsSigLinkClass) {
831 return (cmsGetHeaderRenderingIntent(hProfile) == Intent);
841 return cmsIsIntentSupported(hProfile, Intent, LCMS_USED_AS_INPUT) &&
842 cmsIsIntentSupported(hProfile, INTENT_RELATIVE_COLORIMETRIC, LCMS_USED_AS_OUTPUT);
845 cmsSignalError(cmsGetProfileContextID(hProfile), cmsERROR_RANGE, "Unexpected direction (%d)", UsedDirection);
849 return cmsIsTag(hProfile, TagTable[Intent]);
855 cmsBool CMSEXPORT cmsIsIntentSupported(cmsHPROFILE hProfile,
859 if (cmsIsCLUT(hProfile, Intent, UsedDirection)) return TRUE;
866 return cmsIsMatrixShaper(hProfile);
874 cmsSEQ* _cmsReadProfileSequence(cmsHPROFILE hProfile)
882 ProfileSeq = (cmsSEQ*) cmsReadTag(hProfile, cmsSigProfileSequenceDescTag);
885 ProfileId = (cmsSEQ*) cmsReadTag(hProfile, cmsSigProfileSequenceIdTag);
909 cmsBool _cmsWriteProfileSequence(cmsHPROFILE hProfile, const cmsSEQ* seq)
911 if (!cmsWriteTag(hProfile, cmsSigProfileSequenceDescTag, seq)) return FALSE;
913 if (cmsGetProfileVersion(hProfile) >= 4.0) {
915 if (!cmsWriteTag(hProfile, cmsSigProfileSequenceIdTag, seq)) return FALSE;
970 const cmsMLU* GetInfo(cmsHPROFILE hProfile, cmsInfoType Info)
996 return (cmsMLU*) cmsReadTag(hProfile, sig);
1001 cmsUInt32Number CMSEXPORT cmsGetProfileInfo(cmsHPROFILE hProfile, cmsInfoType Info,
1005 const cmsMLU* mlu = GetInfo(hProfile, Info);
1012 cmsUInt32Number CMSEXPORT cmsGetProfileInfoASCII(cmsHPROFILE hProfile, cmsInfoType Info,
1016 const cmsMLU* mlu = GetInfo(hProfile, Info);