diff options
author | Marti Maria <info@littlecms.com> | 2011-09-02 18:53:14 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2011-09-02 18:53:14 +0200 |
commit | 8dab27371909497127ce6a783d6ce3a7dbfa6289 (patch) | |
tree | a55e191131adcd6a80125b89c8b6d448fe781756 | |
parent | 1e4fab616c4eef7e3ea131386e92fcf34c54f96e (diff) | |
download | lcms2-8dab27371909497127ce6a783d6ce3a7dbfa6289.tar.gz |
Fixed transicc for profiles that have clot tags
-rw-r--r-- | src/cmstypes.c | 2 | ||||
-rw-r--r-- | utils/transicc/transicc.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/cmstypes.c b/src/cmstypes.c index 085f796..75fad1d 100644 --- a/src/cmstypes.c +++ b/src/cmstypes.c @@ -2529,7 +2529,7 @@ cmsBool WriteSetOfCurves(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, // If this is a table-based curve, use curve type even on V4 CurrentType = Type; - if (Curves[i] ->nSegments == 0) + if ((Curves[i] ->nSegments == 0)||(Curves[i]->nSegments == 2) && (Curves[i] ->Segments[1].Type == 0)) CurrentType = cmsSigCurveType; else if (Curves[i] ->Segments[0].Type < 0) diff --git a/utils/transicc/transicc.c b/utils/transicc/transicc.c index 0bb0188..a670b7b 100644 --- a/utils/transicc/transicc.c +++ b/utils/transicc/transicc.c @@ -459,6 +459,11 @@ cmsBool OpenTransforms(void) if (cmsIsTag(hInput, cmsSigColorantTableTag)) { List = cmsReadTag(hInput, cmsSigColorantTableTag); InputColorant = cmsDupNamedColorList(List); + if (cmsNamedColorCount(InputColorant) <= 3) + SetRange(255, TRUE); + else + SetRange(100, TRUE); + } else InputColorant = ComponentNames(InputColorSpace, TRUE); @@ -1124,7 +1129,7 @@ int main(int argc, char *argv[]) int nPatch = 0; - fprintf(stderr, "LittleCMS ColorSpace conversion calculator - 4.0 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0); + fprintf(stderr, "LittleCMS ColorSpace conversion calculator - 4.1 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0); InitUtils("transicc"); |