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?

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.