From 5b468a68fc12bb44286ad1a87b156f99ff52c2b5 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Tue, 22 Nov 2011 12:52:40 +0100 Subject: Final changes to 2.3 --- ChangeLog | 1 + src/cmstypes.c | 2 +- src/cmsvirt.c | 14 +++++++------- utils/common/vprf.c | 6 ++++-- utils/linkicc/linkicc.c | 4 ++-- utils/tificc/tificc.c | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index c854fbc..b71c278 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,3 +51,4 @@ Fixed encoding for floating point tags in Lab/XYZ Fixed Absolute colorimetric intent issues Fixed a bug on the range of data in transicc, when colorant tag is specified Adding a memory alignment macro for CGATS parser +Updated to ICC spec 4.3 \ No newline at end of file diff --git a/src/cmstypes.c b/src/cmstypes.c index 75fad1d..e204727 100644 --- a/src/cmstypes.c +++ b/src/cmstypes.c @@ -164,7 +164,7 @@ typedef cmsBool (* PositionTableEntryFn)(struct _cms_typehandler_struct* self, cmsUInt32Number n, cmsUInt32Number SizeOfTag); -// Helper function to deal with position tables as decribed in several addendums to ICC spec 4.2 +// Helper function to deal with position tables as decribed in ICC spec 4.3 // A table of n elements is readed, where first comes n records containing offsets and sizes and // then a block containing the data itself. This allows to reuse same data in more than one entry static diff --git a/src/cmsvirt.c b/src/cmsvirt.c index 93eb421..9a7e718 100644 --- a/src/cmsvirt.c +++ b/src/cmsvirt.c @@ -114,7 +114,7 @@ cmsHPROFILE CMSEXPORT cmsCreateRGBProfileTHR(cmsContext ContextID, if (!hICC) // can't allocate return NULL; - cmsSetProfileVersion(hICC, 4.2); + cmsSetProfileVersion(hICC, 4.3); cmsSetDeviceClass(hICC, cmsSigDisplayClass); cmsSetColorSpace(hICC, cmsSigRgbData); @@ -218,7 +218,7 @@ cmsHPROFILE CMSEXPORT cmsCreateGrayProfileTHR(cmsContext ContextID, if (!hICC) // can't allocate return NULL; - cmsSetProfileVersion(hICC, 4.2); + cmsSetProfileVersion(hICC, 4.3); cmsSetDeviceClass(hICC, cmsSigDisplayClass); cmsSetColorSpace(hICC, cmsSigGrayData); @@ -281,7 +281,7 @@ cmsHPROFILE CMSEXPORT cmsCreateLinearizationDeviceLinkTHR(cmsContext ContextID, if (!hICC) return NULL; - cmsSetProfileVersion(hICC, 4.2); + cmsSetProfileVersion(hICC, 4.3); cmsSetDeviceClass(hICC, cmsSigLinkClass); cmsSetColorSpace(hICC, ColorSpace); @@ -401,7 +401,7 @@ cmsHPROFILE CMSEXPORT cmsCreateInkLimitingDeviceLinkTHR(cmsContext ContextID, if (!hICC) // can't allocate return NULL; - cmsSetProfileVersion(hICC, 4.2); + cmsSetProfileVersion(hICC, 4.3); cmsSetDeviceClass(hICC, cmsSigLinkClass); cmsSetColorSpace(hICC, ColorSpace); @@ -509,7 +509,7 @@ cmsHPROFILE CMSEXPORT cmsCreateLab4ProfileTHR(cmsContext ContextID, const cmsCIE hProfile = cmsCreateRGBProfileTHR(ContextID, WhitePoint == NULL ? cmsD50_xyY() : WhitePoint, NULL, NULL); if (hProfile == NULL) return NULL; - cmsSetProfileVersion(hProfile, 4.2); + cmsSetProfileVersion(hProfile, 4.3); cmsSetDeviceClass(hProfile, cmsSigAbstractClass); cmsSetColorSpace(hProfile, cmsSigLabData); @@ -554,7 +554,7 @@ cmsHPROFILE CMSEXPORT cmsCreateXYZProfileTHR(cmsContext ContextID) hProfile = cmsCreateRGBProfileTHR(ContextID, cmsD50_xyY(), NULL, NULL); if (hProfile == NULL) return NULL; - cmsSetProfileVersion(hProfile, 4.2); + cmsSetProfileVersion(hProfile, 4.3); cmsSetDeviceClass(hProfile, cmsSigAbstractClass); cmsSetColorSpace(hProfile, cmsSigXYZData); @@ -809,7 +809,7 @@ cmsHPROFILE CMSEXPORT cmsCreateNULLProfileTHR(cmsContext ContextID) if (!hProfile) // can't allocate return NULL; - cmsSetProfileVersion(hProfile, 4.2); + cmsSetProfileVersion(hProfile, 4.3); if (!SetTextTags(hProfile, L"NULL profile built-in")) goto Error; diff --git a/utils/common/vprf.c b/utils/common/vprf.c index b16048c..c166de9 100644 --- a/utils/common/vprf.c +++ b/utils/common/vprf.c @@ -51,14 +51,16 @@ void MyErrorLogHandler(cmsContext ContextID, cmsUInt32Number ErrorCode, const ch if (Verbose >= 0) fprintf(stderr, "[%s]: %s\n", ProgramName, Text); - UTILS_UNUSED_PARAMETER(ErrorCode); - UTILS_UNUSED_PARAMETER(ContextID); + UTILS_UNUSED_PARAMETER(ErrorCode); + UTILS_UNUSED_PARAMETER(ContextID); } void InitUtils(const char* PName) { strncpy(ProgramName, PName, sizeof(ProgramName)); + ProgramName[sizeof(ProgramName)-1] = 0; + cmsSetLogErrorHandler(MyErrorLogHandler); } diff --git a/utils/linkicc/linkicc.c b/utils/linkicc/linkicc.c index d67786f..b532ecb 100644 --- a/utils/linkicc/linkicc.c +++ b/utils/linkicc/linkicc.c @@ -42,7 +42,7 @@ static cmsFloat64Number InkLimit = 400; static cmsBool lUse8bits = FALSE; static cmsBool TagResult = FALSE; static cmsBool KeepLinearization = FALSE; -static cmsFloat64Number Version = 4.2; +static cmsFloat64Number Version = 4.3; // The manual @@ -275,7 +275,7 @@ int main(int argc, char *argv[]) cmsHTRANSFORM hTransform = NULL; // Here we are - fprintf(stderr, "little cms ICC device link generator - v2.1 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0); + fprintf(stderr, "little cms ICC device link generator - v2.2 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0); fflush(stderr); // Initialize diff --git a/utils/tificc/tificc.c b/utils/tificc/tificc.c index 16a979f..57e0b4d 100644 --- a/utils/tificc/tificc.c +++ b/utils/tificc/tificc.c @@ -46,7 +46,7 @@ static int ProofingIntent = INTENT_PERCEPTUAL; static int PrecalcMode = 1; static cmsFloat64Number InkLimit = 400; -static cmsFloat64Number ObserverAdaptationState = 1.0; // According ICC 4.2 this is the default +static cmsFloat64Number ObserverAdaptationState = 1.0; // According ICC 4.3 this is the default static const char *cInpProf = NULL; static const char *cOutProf = NULL; -- cgit v1.2.1