Hello,
i try to check the correct convert from RGB to Lab and back.
But i becomme different results siehe attached file.
For example RGB(0,0,10) ->LAb -> RGB = RGB(0,0,7)
Here my Test procedure.
What can i do ?
procedure TForm1.Button1Click(Sender: TObject);
var
x,y,z, R, G, B, v: integer;
ielab: TCielab;
iergb: hyiedefs.TRGB;
begin
memo3.Clear;
for R := 0 to 15 do
for G := 0 to 15 do
for B := 0 to 15 do
begin
iergb.r := r;
iergb.g := g;
iergb.b := b;
ielab := IERGB2CIELAB(iergb);
rgbcolor := IeCielab2rgb(ielab);
if (iergb.r <> rgbcolor.r) or
(iergb.g <> rgbcolor.g) or
(iergb.b <> rgbcolor.b) then
begin
memo3.Lines.Add('RGB :'+ inttostr(r)+','+inttostr(g)+','+
inttostr(b)+' <> '+
inttostr(rgbcolor.r)+','+
inttostr(rgbcolor.g)+','+
inttostr(rgbcolor.b));
end;
Klaus
www.klausdoege.de