Skip to content

Commit

Permalink
Final changes to 2.16
Browse files Browse the repository at this point in the history
2.16 is closed
  • Loading branch information
mm2 committed Dec 3, 2023
1 parent 0216240 commit f75ee89
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/lcms2.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//
//---------------------------------------------------------------------------------
//
// Version 2.16rc1
// Version 2.16
//

#ifndef _lcms2_H
Expand Down
19 changes: 11 additions & 8 deletions src/cmsps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,18 +661,21 @@ void WriteCLUT(cmsIOHANDLER* m, cmsStage* mpe, const char* PreMaj,
sc.FixWhite = FixWhite;
sc.ColorSpace = ColorSpace;

_cmsIOPrintf(m, "[");
if (sc.Pipeline != NULL && sc.Pipeline->Params != NULL) {

for (i=0; i < sc.Pipeline->Params->nInputs; i++)
_cmsIOPrintf(m, " %d ", sc.Pipeline->Params->nSamples[i]);
_cmsIOPrintf(m, "[");

_cmsIOPrintf(m, " [\n");
for (i = 0; i < sc.Pipeline->Params->nInputs; i++)
_cmsIOPrintf(m, " %d ", sc.Pipeline->Params->nSamples[i]);

cmsStageSampleCLut16bit(mpe, OutputValueSampler, (void*) &sc, SAMPLER_INSPECT);
_cmsIOPrintf(m, " [\n");

_cmsIOPrintf(m, PostMin);
_cmsIOPrintf(m, PostMaj);
_cmsIOPrintf(m, "] ");
cmsStageSampleCLut16bit(mpe, OutputValueSampler, (void*)&sc, SAMPLER_INSPECT);

_cmsIOPrintf(m, PostMin);
_cmsIOPrintf(m, PostMaj);
_cmsIOPrintf(m, "] ");
}

}

Expand Down
2 changes: 1 addition & 1 deletion src/cmstypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ void *Type_Text_Description_Read(struct _cms_typehandler_struct* self, cmsIOHAND

if (UnicodeCount == 0 || SizeOfTag < UnicodeCount*sizeof(cmsUInt16Number)) goto Done;

UnicodeString = (wchar_t*)_cmsMalloc(self->ContextID, (UnicodeCount + 1) * sizeof(wchar_t));
UnicodeString = (wchar_t*)_cmsMallocZero(self->ContextID, (UnicodeCount + 1) * sizeof(wchar_t));
if (UnicodeString == NULL) goto Done;

if (!_cmsReadWCharArray(io, UnicodeCount, UnicodeString)) {
Expand Down

0 comments on commit f75ee89

Please sign in to comment.