Use scanline to get the color of a point on BMP. The Code is as follows. why can it be compiled and run without errors? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiMultimedia/html/delphi_20060923102511298.html
Procedure tform1.image1click (Sender: tobject );
VaR
X, Y: integer;
Pixs: array of tcolor;
Begin
Image1.picture. loadfromfile ('d: \ 001.bmp ');
Pixs: = image1.picture. bitmap. scanline [0];
If pixs [0] = clwhite then showmessage ('www ');
End.
Please let me know if you are passing ..
P: bytearray;
P: = image1.picture. bitmap. scanline [0];
Thanks, but why does the tcolor array fail?
Different Types
Can I convert the scanline values and input them to the tcolor array? I think they all represent colors. Should I do that?
Check the use of scanline.
"Why can I compile and run it without errors? "
If you want to write a compilation task without errorsProgramIt's really easy.
VaR
A: tbitmap
Begin
Form1.canves. Draw (X, Y, );
End;
This should have been compiled but an error occurred!