Fórum PEGAR UMA COR #142332
01/03/2003
0
CAPTURA UMA COR DE UM PIXEL.
FICO NO AGUARDO DE UM PRONUCIAMENTO FAVORAVEL.
FALOU VEIO
FICO NO AGUARDO DE UM PRONUCIAMENTO FAVORAVEL.
FALOU VEIO
Jldmbh
Curtir tópico
+ 0
Responder
Posts
01/03/2003
Carnette
CAPTURA UMA COR DE UM PIXEL.
FICO NO AGUARDO DE UM PRONUCIAMENTO FAVORAVEL.
FALOU VEIO
Como retornar a cor de um pixel de uma imagem
{Para testar o exemplo inclua em um form um componente Image e inclua neste componente Image uma imagem qualquer. Inclua o código abaixo no evento OnMouseMove.}
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
begin
// Retornar a cor
Caption := ColorToString(Image1.Canvas.Pixels[X,Y]);
{ Retornar o número da cor }
Caption := Caption + ´ - ´+IntToStr(ColorToRGB(Image1.Canvas.Pixels[X,Y]));
end;
Esta dica foi testada com uma imagem de formato BMP
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)