summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2011-12-14 14:41:13 +0100
committerMarti Maria <info@littlecms.com>2011-12-14 14:41:13 +0100
commit806bd807d30c440e016c7829d4f20ad7fa0e6c11 (patch)
treeee36e120baaee9b77657d68e11d6b144ccffffc5
parent5b468a68fc12bb44286ad1a87b156f99ff52c2b5 (diff)
downloadlcms2-806bd807d30c440e016c7829d4f20ad7fa0e6c11.tar.gz
Minor modifications for 2.3
-rwxr-xr-xdoc/LittleCMS2.3 API.pdfbin1117638 -> 1124282 bytes
-rwxr-xr-xdoc/LittleCMS2.3 Plugin API.pdfbin487496 -> 492002 bytes
-rwxr-xr-xdoc/LittleCMS2.3 tutorial.pdfbin729790 -> 736326 bytes
-rw-r--r--src/cmstypes.c14
-rw-r--r--testbed/testcms2.c10
5 files changed, 15 insertions, 9 deletions
diff --git a/doc/LittleCMS2.3 API.pdf b/doc/LittleCMS2.3 API.pdf
index 8e12e70..e86ed57 100755
--- a/doc/LittleCMS2.3 API.pdf
+++ b/doc/LittleCMS2.3 API.pdf
Binary files differ
diff --git a/doc/LittleCMS2.3 Plugin API.pdf b/doc/LittleCMS2.3 Plugin API.pdf
index 194e4f8..02fecdc 100755
--- a/doc/LittleCMS2.3 Plugin API.pdf
+++ b/doc/LittleCMS2.3 Plugin API.pdf
Binary files differ
diff --git a/doc/LittleCMS2.3 tutorial.pdf b/doc/LittleCMS2.3 tutorial.pdf
index 1bdfc7a..4ad11b5 100755
--- a/doc/LittleCMS2.3 tutorial.pdf
+++ b/doc/LittleCMS2.3 tutorial.pdf
Binary files differ
diff --git a/src/cmstypes.c b/src/cmstypes.c
index e204727..4548c32 100644
--- a/src/cmstypes.c
+++ b/src/cmstypes.c
@@ -1221,17 +1221,23 @@ static
cmsBool Type_ParametricCurve_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsToneCurve* Curve = (cmsToneCurve*) Ptr;
- int i, nParams;
+ int i, nParams, typen;
static const int ParamsByType[] = { 0, 1, 3, 4, 5, 7 };
+ typen = Curve -> Segments[0].Type;
- if (Curve ->nSegments > 1 || Curve -> Segments[0].Type < 1) {
+ if (Curve ->nSegments > 1 || typen < 1) {
- cmsSignalError(self->ContextID, 0, "Multisegment or Inverted parametric curves cannot be written");
+ cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Multisegment or Inverted parametric curves cannot be written");
return FALSE;
}
- nParams = ParamsByType[Curve ->Segments[0].Type];
+ if (typen > 5) {
+ cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported parametric curve");
+ return FALSE;
+ }
+
+ nParams = ParamsByType[typen];
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) (Curve ->Segments[0].Type - 1))) return FALSE;
if (!_cmsWriteUInt16Number(io, 0)) return FALSE; // Reserved
diff --git a/testbed/testcms2.c b/testbed/testcms2.c
index fd6c16c..f070b09 100644
--- a/testbed/testcms2.c
+++ b/testbed/testcms2.c
@@ -495,7 +495,7 @@ cmsHPROFILE CreateFakeCMYK(cmsFloat64Number InkLimit, cmsBool lUseAboveRGB)
hICC = cmsCreateProfilePlaceholder(ContextID);
if (!hICC) return NULL;
- cmsSetProfileVersion(hICC, 4.2);
+ cmsSetProfileVersion(hICC, 4.3);
cmsSetDeviceClass(hICC, cmsSigOutputClass);
cmsSetColorSpace(hICC, cmsSigCmykData);
@@ -3482,7 +3482,7 @@ cmsInt32Number CheckMLU(void)
h = cmsOpenProfileFromFileTHR(DbgThread(), "mlucheck.icc", "w");
- cmsSetProfileVersion(h, 4.2);
+ cmsSetProfileVersion(h, 4.3);
cmsWriteTag(h, cmsSigProfileDescriptionTag, mlu2);
cmsCloseProfile(h);
@@ -4984,7 +4984,7 @@ cmsInt32Number CheckProfileCreation(void)
h = cmsCreateProfilePlaceholder(DbgThread());
if (h == NULL) return 0;
- cmsSetProfileVersion(h, 4.2);
+ cmsSetProfileVersion(h, 4.3);
if (cmsGetTagCount(h) != 0) { Fail("Empty profile with nonzero number of tags"); return 0; }
if (cmsIsTag(h, cmsSigAToB0Tag)) { Fail("Found a tag in an empty profile"); return 0; }
@@ -5747,7 +5747,7 @@ cmsInt32Number CheckStoredIdentities(void)
cmsSaveProfileToFile(hLink, "abstractv2.icc");
cmsCloseProfile(hLink);
- hLink = cmsTransform2DeviceLink(xform, 4.2, 0);
+ hLink = cmsTransform2DeviceLink(xform, 4.3, 0);
cmsSaveProfileToFile(hLink, "abstractv4.icc");
cmsCloseProfile(hLink);
@@ -6735,7 +6735,7 @@ cmsInt32Number CheckV4gamma(void)
if (h == NULL) return 0;
- cmsSetProfileVersion(h, 4.2);
+ cmsSetProfileVersion(h, 4.3);
if (!cmsWriteTag(h, cmsSigGrayTRCTag, g)) return 0;
cmsCloseProfile(h);