Ver Mensaje Individual
  #2  
Antiguo 22-08-2008
[coso] coso is offline
Miembro Premium
 
Registrado: may 2008
Ubicación: Girona
Posts: 1.678
Reputación: 0
coso Va por buen camino
Código Delphi [-]
function TForm1.Red(c : TColor) : integer;
begin
        Red := c and $FF;
end;

function TForm1.Green(c : TColor) : integer;
begin
        Green := (c and $FF00) div $100;
end;

function TForm1.Blue(c : TColor) : integer;
begin
        Blue := (c and $FF0000) div $10000;
end;

para volver a componer el color seria

Código Delphi [-]
Pixel[x,y] := r + g*$100 + b*$10000;
Responder Con Cita