Hi,
>Reading of the linearisation with Your patch works. Only with
>
> LPGAMMATABLE gamma[4];
> gamma[0] = cmsReadICCLut( hLinear, icSigAToB0Tag);
>
>and
>
> for (i=0; i<gamma[3]->nEntries ; i++)
> g_print ("%d ",gamma[3]->GammaTable[i]);
There is a small mistake here. cmsReadICCLut is supposed to return
a LUT structure, which is not a gamma table.
Try this:
LPLUT Lut = cmsReadICCLut( hLinear, icSigAToB0Tag);
for (i=0; i < Lut ->InputEntries; i++) {
g_print ("C=%d ", Lut ->L1[0][i]);
g_print ("M=%d ", Lut ->L1[1][i]);
g_print ("Y=%d ", Lut ->L1[2][i]);
g_print ("K=%d ", Lut ->L1[3][i]);
}
Regards,
Marti.
----- Original Message -----
From: "Kai-Uwe Behrmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 12, 2004 7:20 PM
Subject: Re: [Lcms-user] embedding linearisation for calibration
Sorry for my last email being so confusing.
Reading of the linearisation with Your patch works. Only with
LPGAMMATABLE gamma[4];
gamma[0] = cmsReadICCLut( hLinear, icSigAToB0Tag);
and
for (i=0; i<gamma[3]->nEntries ; i++)
g_print ("%d ",gamma[3]->GammaTable[i]);
I can not see my original table. I think I have to wait till liblcms
writes out the correct device link and then I can complete the
linearisation gui stuff in cinepaint.
I attach You the merged profiles of cmsCreateMultiprofileTransform:
merge[0] *Lab (lcms internal)
merge[1] printer.icc (EPS2100_GCR4_260_030304.icc)
merge[2] linear.icc (cinepaint_merge_sep-lin_temp.icc)
Working with lcms' internal device links is ok.
... releasing the print code meanwhile and looking forward to the lcms
changes in the future.
thanks
Kai-Uwe
PS: I come with more questions and suggestions to the list.
Am 12.03.04, 17:03 -0000 schrieb [EMAIL PROTECTED]:
>
>
>
> > Here lcms quits with: error 12288 Unknown output format - this is probably
> > due to an memory error. I could not find out were. lcms tries to load the
> > tables and gives following messages via valgrind:
>
> Hi,
>
> Aha, I can reproduce the problem. Yes, it is a bug. The virtual profile
> generated by cmsCreateLinearizationDeviceLink is using a CLUT of 0 points,
> and of course this is non-standard and confuses the reading routines.
>
> This was becuse I used the linearization always as virtual profile, and
> never tried to save it to a file. Ok, will be fixed in the next revision.
> As a workaround, in cmsio1.c, function ReadLUT16:
>
> Substitute:
>
>
> nTabSize = (NewLUT -> OutputChan * uipow(NewLUT->cLutPoints,
> NewLUT->InputChan));
> PtrW = (LPWORD) malloc(sizeof(WORD) * nTabSize);
>
> NewLUT -> T = PtrW;
> NewLUT -> Tsize = nTabSize * sizeof(WORD);
>
> Icc -> Read(PtrW, sizeof(WORD), nTabSize, Icc -> stream);
> AdjustEndianessArray16(NewLUT -> T, nTabSize);
>
>
> By:
>
> if (NewLUT -> cLutPoints == 0) {
>
> NewLUT -> wFlags &= ~LUT_HAS3DGRID;
> NewLUT -> T = NULL;
> NewLUT -> Tsize = 0;
> }
> else {
> nTabSize = (NewLUT -> OutputChan * uipow(NewLUT->cLutPoints,
> NewLUT->InputChan));
> PtrW = (LPWORD) malloc(sizeof(WORD) * nTabSize);
>
> NewLUT -> T = PtrW;
> NewLUT -> Tsize = nTabSize * sizeof(WORD);
>
> Icc -> Read(PtrW, sizeof(WORD), nTabSize, Icc -> stream);
> AdjustEndianessArray16(NewLUT -> T, nTabSize);
> }
>
> This should make the trick
> Regards,
> Matri.
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user