I think this should be something like:
gamtbl:=cmsReadICCGamma(hSrc, StrToInt('$' + '72545243'));
for i:=0 to gamtbl^.nEntries - 1 do
begin
Memo1.Lines.Add(inttostr(gamtbl^.GammaTable[i])))
end;
GammaTable[] contains nEntries entries, those are the nodes for
linear interpolation. The 0...1 is just a declaration trick.
P.S.: a little mistake I found in the lcmsdll.pas
Ops, parameters are swapped. Thank you for let me know.
Regards
Marti.
----- Original Message -----
From: "andre koerner" <[EMAIL PROTECTED]>
To: "'Marti'" <[EMAIL PROTECTED]>
Sent: Wednesday, August 10, 2005 1:59 PM
Subject: AW: [Lcms-user] dump tables
Hello,
You wrote:
gamest^.GammaTable[]
I think you mean:
gamtbl^.GammaTable[]
I tested it with the following code, by reading the ECI-RGB.V1.0.icc
gamtbl:=cmsReadICCGamma(hSrc, StrToInt('$' + '72545243'));
for i:=1 to gamtbl^.nEntries do
begin
Memo1.Lines.Add(inttostr(gamtbl^.GammaTable[0])+'
'+inttostr(gamtbl^.GammaTable[1]));
Inc(gamtbl);
end;
I only get approximate linear values from "0 0" to " 65262 65262".
regards,
andré k.
P.S.: a little mistake I found in the lcmsdll.pas
PROCEDURE cmsLab2LCh(Lab: LPcmsCIELab; LCh: LPcmsCIELCh); StdCall;
PROCEDURE cmsLCh2Lab(LCh: LPcmsCIELCh; Lab: LPcmsCIELab); StdCall;
-----Ursprüngliche Nachricht-----
Von: Marti [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 10. August 2005 10:59
An: andre koerner; lcms-user@lists.sourceforge.net
Betreff: Re: [Lcms-user] dump tables
Hi,
My first problem is to dump the gammatable into an array of string for
output.
gamtbl:=cmsReadICCGamma(hSrc, StrToInt('$' + '72545243'));
gamest:=cmsEstimateGamma(gamtbl);
So I get the result approximate 1.8 by using eci.icc
But how did I get the real values instead of the EstimateGamma?
gamest^.GammaTable[]
You can also access the number of entries in the table by using
gamest^.nEntries
My second problem is to dump the Look-Up-Table into an array of string for
output.
Ops, here the problem comes evident. A LUT may have a lot of different
implementations,
not only one table. In fact it was so hard than I didn't include in the
Delphi wrapper,
that is the reason cmsReadICCLut is not there. Maybe you could convert the C
structure
to Delphi. If you want to give a try, it is located in lcms.h, struct
_lcms_LUT_struc
But be careful because it is not part of the API and thus may change across
lcms revisions.
(it has changed in 1.15)
Regards
--
Marti Maria
The littlecms project.
www.littlecms.com
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.2/65 - Release Date: 07/08/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.2/65 - Release Date: 07/08/2005
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user