...RGB nach COLORREF (BGR) konvertieren?
Autor: Martin
function RGB2BGR(R, G, B: Byte): COLORREF; overload;
begin
Result := (Integer(B) shl 16) + (Integer(G) shl 8) + R;
end;
function RGB2BGR(RGB: Integer): COLORREF; overload;
var
R, G, B: Integer;
begin
R := RGB div $10000;
G := ((RGB mod $10000) div $100) shl 8;
B := (RGB mod $100) shl 16;
Result := B + G + R;
end;
printed from
www.swissdelphicenter.ch
developers knowledge base