This method retrieves the RGB values from a specified pixel in the designated object. (The screen or the image data).
[TVIkOutPutDeviceMode Type]
Unit
IkInit
type
TVIkOutPutDeviceMode = (vikScreen,
vikPrinter, vikMemoryHandle);
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data |
x, y | The x,y coordinates of the pixel |
Red | The red component of the RGB value |
Green | The green component of the RGB value |
Blue | The blue component of the RGB value |
DeviceMode | The designated object (vikScreen: Screen, vikMemoryHandle: Image memory handle) |
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The GetPixel method retrieves the RGB values from the pixel specified by the x and y parameters. This method is enabled when the DeviceMode parameter is vikScreen or vikMemoryHandle. In other words, this method can only be used with the screen or the image memory handle but not with the printer. Please set the x and y parameters in pixel units.
Differences between the ImageKit7/8/9
In VCL the constants contain a "v". In ActiveX, the constants
are: ikScreen, ikMemoryHandle.
The Red, Green, and Blue parameters are changed to Byte type