diff options
author | Marti Maria <info@littlecms.com> | 2011-03-11 16:14:51 +0100 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2011-03-11 16:14:51 +0100 |
commit | 314bc7201d340ab303b36a0ade2c37cf40b83a3b (patch) | |
tree | 4209c74140f53d4e94ec64c6fedb7728ae07ea32 /src/cmstypes.c | |
parent | 1647ce11d8194fa70da7b7b5c31673626be6ab53 (diff) | |
download | lcms2-314bc7201d340ab303b36a0ade2c37cf40b83a3b.tar.gz |
Fixing several minor issues
Diffstat (limited to 'src/cmstypes.c')
-rw-r--r-- | src/cmstypes.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/cmstypes.c b/src/cmstypes.c index 394a225..47d0e35 100644 --- a/src/cmstypes.c +++ b/src/cmstypes.c @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2010 Marti Maria Saguer +// Copyright (c) 1998-2011 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), @@ -1622,7 +1622,7 @@ cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut Tables[i]->Table16[j] = (cmsUInt16Number) FROM_8_TO_16(Temp[j]); } - _cmsFree(ContextID, Temp); + _cmsFree(ContextID, Temp); Temp = NULL; @@ -1688,7 +1688,7 @@ unsigned int uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b) if (n == 0) return 0; for (; b > 0; b--) { - + rv *= a; // Check for overflow @@ -1889,16 +1889,16 @@ cmsBool Type_LUT8_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, nTabSize = uipow(NewLUT->OutputChannels, clutPoints, NewLUT ->InputChannels); if (nTabSize > 0) { - // The 3D CLUT. - if (clut != NULL) { + // The 3D CLUT. + if (clut != NULL) { - for (j=0; j < nTabSize; j++) { + for (j=0; j < nTabSize; j++) { - val = (cmsUInt8Number) FROM_16_TO_8(clut ->Tab.T[j]); - if (!_cmsWriteUInt8Number(io, val)) return FALSE; + val = (cmsUInt8Number) FROM_16_TO_8(clut ->Tab.T[j]); + if (!_cmsWriteUInt8Number(io, val)) return FALSE; + } } } - } // The postlinearization table if (!Write8bitTables(self ->ContextID, io, NewLUT ->OutputChannels, PostMPE)) return FALSE; @@ -2202,10 +2202,10 @@ cmsBool Type_LUT16_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io nTabSize = uipow(OutputChannels, clutPoints, InputChannels); if (nTabSize > 0) { - // The 3D CLUT. - if (clut != NULL) { - if (!_cmsWriteUInt16Array(io, nTabSize, clut->Tab.T)) return FALSE; - } + // The 3D CLUT. + if (clut != NULL) { + if (!_cmsWriteUInt16Array(io, nTabSize, clut->Tab.T)) return FALSE; + } } // The postlinearization table @@ -2370,7 +2370,7 @@ cmsStage* ReadSetOfCurves(struct _cms_typehandler_struct* self, cmsIOHANDLER* io if (nCurves > cmsMAXCHANNELS) return FALSE; if (!io -> Seek(io, Offset)) return FALSE; - + for (i=0; i < nCurves; i++) Curves[i] = NULL; @@ -2380,9 +2380,9 @@ cmsStage* ReadSetOfCurves(struct _cms_typehandler_struct* self, cmsIOHANDLER* io if (Curves[i] == NULL) goto Error; if (!_cmsReadAlignment(io)) goto Error; } - + Lin = cmsStageAllocToneCurves(self ->ContextID, nCurves, Curves); - + Error: for (i=0; i < nCurves; i++) cmsFreeToneCurve(Curves[i]); @@ -3242,7 +3242,7 @@ static cmsBool SaveDescription(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsMLU* Text) { if (self ->ICCVersion < 0x4000000) { - + if (!_cmsWriteTypeBase(io, cmsSigTextDescriptionType)) return FALSE; return Type_Text_Description_Write(self, io, Text, 1); } @@ -4555,9 +4555,9 @@ void *Type_vcgt_Read(struct _cms_typehandler_struct* self, if (!_cmsReadUInt16Number(io, &nElems)) goto Error; if (!_cmsReadUInt16Number(io, &nBytes)) goto Error; - // Adobe's quirk fixup. Fixing broken profiles... - if (nElems == 256 && nBytes == 1 && SizeOfTag == 1576) - nBytes = 2; + // Adobe's quirk fixup. Fixing broken profiles... + if (nElems == 256 && nBytes == 1 && SizeOfTag == 1576) + nBytes = 2; // Populate tone curves |