I am trying to get the current pixel in an image by a “OnMouseMove event” Using Scanline.
something equivalent to this:
Label1.Caption := IntToStr(Image1.Picture.Bitmap.Canvas.Pixels[X,Y]);
Any ideas ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
ScanLine returns a pointer to a packed array of pixels that constitutes one line of a bitmap. Using this pointer you can access these pixels fast.
ScanLine can’t help if you need only one pixel.
Still you can use ScanLine here; assuming bitmap pixel format pf32bit: