Is the Api Function “GetPixel” faster than Canvas.Pixels ?
Share
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.
The GetPixel function is very slow! If you need high (or even acceptable) performance, you should use the ScanLine property. ScanLine[y] is a pointer to the yth line of pixels in the bitmap, encoded in the format specified by the PixelFormat property. For instance, for a 24-bit bitmap, the line has the format
B1 G1 R1 B2 G2 R2 … Bn Gn Rn
if the width of the bitmap is n. Bi, Gi, and Ri are the blue, green, and red intensities of pixel i, respectively, as bytes.