summaryrefslogtreecommitdiff
path: root/lcms2mt
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2019-01-02 11:54:21 +0000
committerRobin Watts <robin.watts@artifex.com>2019-01-02 11:55:52 +0000
commit42646d6c9e264d8f8c34e5e32cde3e02ff83b87d (patch)
treefd56d60635bb8e059b42e4d19a34566b0c2a15ce /lcms2mt
parentef075a44f37f89dcbff03bf0bdcc7e7b6fe17c15 (diff)
downloadghostpdl-42646d6c9e264d8f8c34e5e32cde3e02ff83b87d.tar.gz
Pull in fixes from lcms2mt repo.
(This pulls in the latest fixes from mainline lcms2 too).
Diffstat (limited to 'lcms2mt')
-rw-r--r--lcms2mt/README.1ST6
-rw-r--r--lcms2mt/src/cmsopt.c7
-rw-r--r--lcms2mt/src/cmsxform.c2
-rw-r--r--lcms2mt/src/lcms2_internal.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/lcms2mt/README.1ST b/lcms2mt/README.1ST
index 4cdcb1372..a0fb1e9af 100644
--- a/lcms2mt/README.1ST
+++ b/lcms2mt/README.1ST
@@ -1,5 +1,5 @@
-This is lcms2.8.art. This is a forked, binary incompatible version
-of lcms2.8. For details of the differences from vanilla lcms2.8
-see doc/WhyThisFork.txt
+This is lcms2mt, version 2.9. This is a forked, binary incompatible
+version of lcms2.9. For details of the differences from vanilla
+lcms2.9 see doc/WhyThisFork.txt
Please see the documentation in doc folder
diff --git a/lcms2mt/src/cmsopt.c b/lcms2mt/src/cmsopt.c
index 0516da0ee..93d78f261 100644
--- a/lcms2mt/src/cmsopt.c
+++ b/lcms2mt/src/cmsopt.c
@@ -1439,14 +1439,15 @@ cmsBool OptimizeByJoiningCurves(cmsContext ContextID, cmsPipeline** Lut, cmsUInt
// Maybe the curves are linear at the end
if (!AllCurvesAreLinear(ContextID, ObtainedCurves)) {
+ _cmsStageToneCurvesData* Data;
if (!cmsPipelineInsertStage(ContextID, Dest, cmsAT_BEGIN, ObtainedCurves))
goto Error;
+ Data = (_cmsStageToneCurvesData*) cmsStageData(ContextID, ObtainedCurves);
+ ObtainedCurves = NULL;
// If the curves are to be applied in 8 bits, we can save memory
if (_cmsFormatterIs8bit(*InputFormat)) {
-
- _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) ObtainedCurves ->Data;
Curves16Data* c16 = CurvesAlloc(ContextID, Data ->nCurves, 256, Data ->TheCurves);
if (c16 == NULL) goto Error;
@@ -1455,8 +1456,6 @@ cmsBool OptimizeByJoiningCurves(cmsContext ContextID, cmsPipeline** Lut, cmsUInt
}
else {
-
- _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) cmsStageData(ContextID, ObtainedCurves);
Curves16Data* c16 = CurvesAlloc(ContextID, Data ->nCurves, 65536, Data ->TheCurves);
if (c16 == NULL) goto Error;
diff --git a/lcms2mt/src/cmsxform.c b/lcms2mt/src/cmsxform.c
index bcc9c623f..8ebfcf79b 100644
--- a/lcms2mt/src/cmsxform.c
+++ b/lcms2mt/src/cmsxform.c
@@ -1164,7 +1164,7 @@ _cmsTRANSFORM* AllocEmptyTransform(cmsContext ContextID, cmsPipeline* lut,
// Save the day? (Ignore the warning)
if (Plugin->OldXform) {
- p->OldXform = (_cmsTransformFn) p->xform;
+ p->OldXform = (_cmsTransformFn)(void*) p->xform;
p->xform = _cmsTransform2toTransformAdaptor;
}
return p;
diff --git a/lcms2mt/src/lcms2_internal.h b/lcms2mt/src/lcms2_internal.h
index ec6039587..bc971fc50 100644
--- a/lcms2mt/src/lcms2_internal.h
+++ b/lcms2mt/src/lcms2_internal.h
@@ -114,7 +114,9 @@
#else
# if !defined(HAVE_ISINF)
+# if !defined(isinf)
# define isinf(x) (!finite((x)))
+# endif
# endif
#endif