|
@@ -2680,12 +2680,9 @@ static int la_InitProofLUT(void** lut, cmsHPROFILE cmyk_profile, cmsHPROFILE rgb
|
|
INTENT_ABSOLUTE_COLORIMETRIC,INTENT_ABSOLUTE_COLORIMETRIC,cmsFLAGS_HIGHRESPRECALC|cmsFLAGS_SOFTPROOFING|cmsFLAGS_NOOPTIMIZE);
|
|
INTENT_ABSOLUTE_COLORIMETRIC,INTENT_ABSOLUTE_COLORIMETRIC,cmsFLAGS_HIGHRESPRECALC|cmsFLAGS_SOFTPROOFING|cmsFLAGS_NOOPTIMIZE);
|
|
if(!htransform){ (*lut)=0; return 0; }
|
|
if(!htransform){ (*lut)=0; return 0; }
|
|
real data[LA_LUT_PIXCOUNT*3];
|
|
real data[LA_LUT_PIXCOUNT*3];
|
|
- real cmyk8[LA_LUT_PIXCOUNT*4];
|
|
|
|
int prec=LA_LUT_PRECISION;
|
|
int prec=LA_LUT_PRECISION;
|
|
- for(int i=0;i<prec;i++){
|
|
|
|
- int counti=i*prec*prec;
|
|
|
|
- for(int j=0;j<prec;j++){
|
|
|
|
- int countj=j*prec;
|
|
|
|
|
|
+ for(int i=0;i<prec;i++){ int counti=i*prec*prec;
|
|
|
|
+ for(int j=0;j<prec;j++){ int countj=j*prec;
|
|
for(int k=0;k<prec;k++){
|
|
for(int k=0;k<prec;k++){
|
|
real* p=&data[(counti+countj+k)*3];
|
|
real* p=&data[(counti+countj+k)*3];
|
|
p[0]=((real)i)/LA_LUT_VAL; p[1]=((real)j)/LA_LUT_VAL; p[2]=((real)k)/LA_LUT_VAL;
|
|
p[0]=((real)i)/LA_LUT_VAL; p[1]=((real)j)/LA_LUT_VAL; p[2]=((real)k)/LA_LUT_VAL;
|
|
@@ -2704,8 +2701,8 @@ int laLoadProofingICC(char* path){
|
|
cmsHPROFILE d65p3 = la_CreateProfileD65P3();
|
|
cmsHPROFILE d65p3 = la_CreateProfileD65P3();
|
|
char* lut1,*lut2,*lut3; int res=0;
|
|
char* lut1,*lut2,*lut3; int res=0;
|
|
la_InitProofLUT(&lut1,cmyk,srgb); if(!lut1){ goto cleanup; }
|
|
la_InitProofLUT(&lut1,cmyk,srgb); if(!lut1){ goto cleanup; }
|
|
- la_InitProofLUT(&lut2,cmyk,srgb); if(!lut2){ goto cleanup; }
|
|
|
|
- la_InitProofLUT(&lut3,cmyk,srgb); if(!lut3){ goto cleanup; }
|
|
|
|
|
|
+ la_InitProofLUT(&lut2,cmyk,clay); if(!lut2){ goto cleanup; }
|
|
|
|
+ la_InitProofLUT(&lut3,cmyk,d65p3); if(!lut3){ goto cleanup; }
|
|
|
|
|
|
laProofingLUT *pl=memAcquire(sizeof(laProofingLUT));
|
|
laProofingLUT *pl=memAcquire(sizeof(laProofingLUT));
|
|
char* name=strGetLastSegment(path,LA_PATH_SEP);
|
|
char* name=strGetLastSegment(path,LA_PATH_SEP);
|
|
@@ -2716,7 +2713,9 @@ int laLoadProofingICC(char* path){
|
|
laSetProofingLut(pl);
|
|
laSetProofingLut(pl);
|
|
res=1;
|
|
res=1;
|
|
cleanup:
|
|
cleanup:
|
|
- if(lut1) free(lut1); if(lut2) free(lut2); if(lut3) free(lut3);
|
|
|
|
|
|
+ if(res==0){
|
|
|
|
+ if(lut1) free(lut1); if(lut2) free(lut2); if(lut3) free(lut3);
|
|
|
|
+ }
|
|
cmsCloseProfile(srgb); cmsCloseProfile(clay); cmsCloseProfile(d65p3);
|
|
cmsCloseProfile(srgb); cmsCloseProfile(clay); cmsCloseProfile(d65p3);
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|