|
UnmanagedImageGetPixel Method (Int32, Int32)
|
Get color of the pixel with the specified coordinates.
Namespace:
Accord.Imaging
Assembly:
Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax public Color GetPixel(
int x,
int y
)
Public Function GetPixel (
x As Integer,
y As Integer
) As Color
Request Example
View SourceParameters
- x
- Type: SystemInt32
X coordinate of the pixel to get. - y
- Type: SystemInt32
Y coordinate of the pixel to get.
Return Value
Type:
ColorReturn pixel's color at the specified coordinates.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | The specified pixel coordinate is out of image's bounds. |
UnsupportedImageFormatException | Pixel format of this image is not supported by the method. |
Remarks Note |
---|
In the case if the image has 8 bpp grayscale format, the method will return a color with
all R/G/B components set to same value, which is grayscale intensity. |
Note |
---|
The method supports only 8 bpp grayscale images and 24/32 bpp color images so far. |
See Also