|
Hi,
> If I have create a Lab profile with
cmsCreateLabprofile(NULL) and the save it to memory with _cmsSaveProfileToMem,
it failed
Yep, this was intentionally. Lab virtual profile is
a very special one, its purpose is to access directly PCS so, it really does nothing but pass input unchanged to output.
In this way is an identity with empty LUT tables. This is beyond the ICC spec, and not useable by other CMM but lcms. So,
in the case you could be able to save the
profile, it would be of no use in any other CMM.
However, there is a way to create such profile.
Just type:
icclink -x -o lab2lab.icc *Lab *Lab
It will generate a 33 point abstract profile named
'lab2lab.icc' that is just what you want.
Hope this helps,
----- Original Message -----
Sent: Monday, June 14, 2004 9:58 AM
Subject: [Lcms-user] Problem in AIX
Hi Marti,
If I have create a Lab
profile with cmsCreateLabprofile(NULL) and the save it to memory with
_cmsSaveProfileToMem, it failed in AIX, because malloc in AIX can not allocate
0 byte. The function SaveWordsTable in this case failed with nTabSize ==
0.
static BOOL SaveWordsTable(FILE* OutStream, int nEntries, LPWORD Tab, LPLCMSICCPROFILE Icc) {
size_t nTabSize = sizeof(WORD) * nEntries;
LPWORD PtrW = (LPWORD)
malloc(nTabSize); -->nTabSize == 0 -->PtrW == NULL
if (!PtrW)
return FALSE; -->
fail CopyMemory(PtrW,
Tab, nTabSize);
AdjustEndianessArray16(PtrW, nEntries); Icc ->Write(OutStream, nTabSize,
PtrW);
free(PtrW);
return TRUE; }
Any idea to support AIX? Our Test in
HP-UX, Solaris, Linux, Windows is very good.
Thank you very much for your super code.
Wei
Wang
---------------------------------------------------- Compart
Systemhaus GmbH Otto-Lilienthal-Stra�e 38 D-71034 B�blingen
fon:
+49 (0)7031/6205-57 fax: +49
(0)7031/6205-55 http://www.compart.net [EMAIL PROTECTED]
|