Is the Api "GetPixel" function faster than Canvas.Pixels?
It should be the same:
function TCanvas.GetPixel(X, Y: Integer): TColor; begin RequiredState([csHandleValid]); GetPixel := Windows.GetPixel(FHandle, X, Y); end;
If you are looking for something that works better than GetPixel / Canvas.Pixel [], you should check Bitmap.ScanLine. Only problem is that data can be organized in several ways defined by Bitmap.PixelFormat
GetPixel ! ( ) , ScanLine. ScanLine [y] - y- , , PixelFormat. , 24-
B1 G1 R1 B2 G2 R2... Bn Gn Rn
n. Bi, Gi Ri - , , .