CornerPixel(Value: GxCorner): IGxColor;
Value. Angular point type.
The CornerPixel property returns the color of the specified angular point.
Executing the example requires a form with the Button1 button and the ImageBox component named ImageBox1. An image is loaded to ImageBox1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Image: IGxImage;
Color: IGxColor;
Begin
Image := ImageBox1.Image;
Color := Image.CornerPixel(GxCorner.BottomLeft);
Debug.WriteLine("R: " + Color.R.ToString + " G: " + Color.G.ToString + " B: " + Color.B.ToString);
End Sub Button1OnClick;
On clicking the button the Color variable contains the color of the left bottom point of the image contained in the component named ImageBox1. The R, G and B components of the obtained color are displayed in the development environment console.
See also: