Hello,
I work with the lcms-1.14 source.
I tried to use the cmsAdaptToIlluminant procedure in a little Delphiapplication
The first problem was, that the cmsAdaptToIlluminant procedure doesn’t exist in the lcmsdll.pas
and after I added:
PROCEDURE cmsAdaptToIlluminant(Result: LPcmsCIEXYZ; SourceWhitePt: LPcmsCIEXYZ; Illuminant: LPcmsCIEXYZ; Value: LPcmsCIEXYZ); StdCall;
and
PROCEDURE cmsAdaptToIlluminant(Result: LPcmsCIEXYZ; SourceWhitePt: LPcmsCIEXYZ; Illuminant: LPcmsCIEXYZ; Value: LPcmsCIEXYZ) ; EXTERNAL 'lcms.dll';
to the lcmsdll.pas it seems to work, but
the result I get are wrong.
Here is the Delphi code: //-------------------------------------------------------------------------- Procedure TForm1.Button1Click (Sender: TObject);
var xyzsrc, xyzdest, wpsrc, wpdest : cmsCIEXYZ; xresult, yresult, zresult: real;
Begin xyzsrc.X:=0.9505; xyzsrc.X:=1; xyzsrc.X:=1.089;
wpsrc.X:=0.95050; wpsrc.Y:=1; wpsrc.Z:=1.089;
wpdest.X:=0.9642; wpdest.Y:=1; wpdest.Z:=0.8253;
cmsAdaptToIlluminant(@xyzdest, @wpsrc, @wpdest, @xyzsrc);
xresult := xyzdest.X*100; yresult := xyzdest.Y*100; zresult := xyzdest.Z*100; End; //--------------------------------------------------------------------
The results i get are:
xresult = 114.1 instead of xresult = 0.9642 yresult = 3.2 instead of yresult = 1 zresult = -1.0 instead of zresult = 0.8253
Where is the bug?
Thanks in avance.
André Körner
|
- [Lcms-user] adaption andre koerner
- Re: [Lcms-user] adaption Marti