diff options
author | Marti Maria <info@littlecms.com> | 2010-09-17 08:58:06 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2010-09-17 08:58:06 +0200 |
commit | 9e476cd747f18b6306abc1329050a564dc725b0d (patch) | |
tree | 5d65416f2a8e3c6fc633a1fe3095672306b72be0 /src/cmsps2.c | |
parent | 60b8b17bd7a9b77e00528c623f6f95a3541be649 (diff) | |
download | lcms2-9e476cd747f18b6306abc1329050a564dc725b0d.tar.gz |
Fixed bug in CSA generation
Fixed Mac endianess issue
Diffstat (limited to 'src/cmsps2.c')
-rw-r--r-- | src/cmsps2.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/cmsps2.c b/src/cmsps2.c index f8bbb9f..b41f58f 100644 --- a/src/cmsps2.c +++ b/src/cmsps2.c @@ -743,9 +743,9 @@ int EmitCIEBasedABC(cmsIOHANDLER* m, cmsFloat64Number* Matrix, cmsToneCurve** Cu for( i=0; i < 3; i++ ) { - _cmsIOPrintf(m, "%.6f %.6f %.6f ", Matrix[0 + 3*i], - Matrix[1 + 3*i], - Matrix[2 + 3*i]); + _cmsIOPrintf(m, "%.6f %.6f %.6f ", Matrix[i + 3*0], + Matrix[i + 3*1], + Matrix[i + 3*2]); } @@ -962,7 +962,16 @@ int WriteInputMatrixShaper(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsStage* Matr else if (ColorSpace == cmsSigRgbData) { - rc = EmitCIEBasedABC(m, GetPtrToMatrix(Matrix), + cmsMAT3 Mat; + int i, j; + + memmove(&Mat, GetPtrToMatrix(Matrix), sizeof(Mat)); + + for (i=0; i < 3; i++) + for (j=0; j < 3; j++) + Mat.v[i].n[j] *= MAX_ENCODEABLE_XYZ; + + rc = EmitCIEBasedABC(m, (cmsFloat64Number *) &Mat, _cmsStageGetPtrToCurveSet(Shaper), &BlackPointAdaptedToD50); } |