< prev index next >

src/java.desktop/share/native/liblcms/cmsvirt.c

Print this page

        

*** 28,38 **** // file: // //--------------------------------------------------------------------------------- // // Little Color Management System ! // Copyright (c) 1998-2017 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, --- 28,38 ---- // file: // //--------------------------------------------------------------------------------- // // Little Color Management System ! // Copyright (c) 1998-2020 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense,
*** 388,398 **** // M = Ratio * M // Y = Ratio * Y // K: Does not change static ! int InkLimitingSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo) { cmsFloat64Number InkLimit = *(cmsFloat64Number *) Cargo; cmsFloat64Number SumCMY, SumCMYK, Ratio; InkLimit = (InkLimit * 655.35); --- 388,398 ---- // M = Ratio * M // Y = Ratio * Y // K: Does not change static ! int InkLimitingSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo) { cmsFloat64Number InkLimit = *(cmsFloat64Number *) Cargo; cmsFloat64Number SumCMY, SumCMYK, Ratio; InkLimit = (InkLimit * 655.35);
*** 639,660 **** } //sRGB Curves are defined by: // ! //If R’sRGB,G’sRGB, B’sRGB < 0.04045 // ! // R = R’sRGB / 12.92 ! // G = G’sRGB / 12.92 ! // B = B’sRGB / 12.92 // // ! //else if R’sRGB,G’sRGB, B’sRGB >= 0.04045 // ! // R = ((R’sRGB + 0.055) / 1.055)^2.4 ! // G = ((G’sRGB + 0.055) / 1.055)^2.4 ! // B = ((B’sRGB + 0.055) / 1.055)^2.4 static cmsToneCurve* Build_sRGBGamma(cmsContext ContextID) { cmsFloat64Number Parameters[5]; --- 639,660 ---- } //sRGB Curves are defined by: // ! //If R'sRGB,G'sRGB, B'sRGB < 0.04045 // ! // R = R'sRGB / 12.92 ! // G = G'sRGB / 12.92 ! // B = B'sRGB / 12.92 // // ! //else if R'sRGB,G'sRGB, B'sRGB >= 0.04045 // ! // R = ((R'sRGB + 0.055) / 1.055)^2.4 ! // G = ((G'sRGB + 0.055) / 1.055)^2.4 ! // B = ((B'sRGB + 0.055) / 1.055)^2.4 static cmsToneCurve* Build_sRGBGamma(cmsContext ContextID) { cmsFloat64Number Parameters[5];
*** 713,723 **** } BCHSWADJUSTS, *LPBCHSWADJUSTS; static ! int bchswSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo) { cmsCIELab LabIn, LabOut; cmsCIELCh LChIn, LChOut; cmsCIEXYZ XYZ; LPBCHSWADJUSTS bchsw = (LPBCHSWADJUSTS) Cargo; --- 713,723 ---- } BCHSWADJUSTS, *LPBCHSWADJUSTS; static ! int bchswSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo) { cmsCIELab LabIn, LabOut; cmsCIELCh LChIn, LChOut; cmsCIEXYZ XYZ; LPBCHSWADJUSTS bchsw = (LPBCHSWADJUSTS) Cargo;
*** 1123,1135 **** if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID))) goto Error; } ! // On the output side too if ((xform ->ExitColorSpace) == cmsSigLabData && (Version < 4.0)) { if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID))) goto Error; } --- 1123,1136 ---- if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID))) goto Error; } ! // On the output side too. Note that due to V2/V4 PCS encoding on lab we cannot fix white misalignments if ((xform ->ExitColorSpace) == cmsSigLabData && (Version < 4.0)) { + dwFlags |= cmsFLAGS_NOWHITEONWHITEFIXUP; if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID))) goto Error; }
< prev index next >