> 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