ImageGetPixelColorΒΆ
ImageGetPixelColor returns the color value of a pixel as an RGB value.
-
rgb = ImageGetPixelColor(hImg, x, y)
-
rgbMat = ImageGetPixelColor(hImg)
Return Value
rgb is the scalar color value of the specified pixel in the range 0 to 255.
If x or y is out of range the function returns the color value of the pixel x=1,
y=1. In case of an error the functions returns -1. To convert the color value to
an RGB color vector:
rvRGB = [(rgb & 0x000000ff), (rgb & 0x0000ff00) >> 8, (rgb & 0x00ff0000) >> 16]
Parameters
-
hImg
hImg identifies the picture created with ImageCreate.
-
x
x is the horizontal pixel position in the range 1 to ImageGetWidth.
-
y
y is the vertical pixel position in the range 1 to ImageGetHeight.
History
Version | Description |
---|---|
5.3.2 | |
5.2.0 | New |
id-968740