int GetColorIndex(
int x,
int y
)Function GetColorIndex (
x As Integer,
y As Integer
) As Integerint GetColorIndex(
int x,
int y
)abstract GetColorIndex :
x : int *
y : int -> int This method can be used only if Indexed is set in the PixelFormat of this IReadableBitmapData. Otherwise, this method throws an InvalidOperationException.
To get the actual color of the pixel at the specified coordinates you can use the GetColor.../GetPColor... methods, or you can call the Palette.GetColor method with the return value of this method on the Palette instance returned by the Palette property of this IReadableBitmapData.
| ArgumentOutOfRangeException | x is less than zero or is greater than or equal to Width.
-or- y is less than zero or is greater than or equal to Height. |
| InvalidOperationException | This IReadableBitmapData does not have an indexed pixel format. |