This method retrieves the RGB values from a specified pixel in the designated object. (The screen or the image data).

[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->GetPixel(NativeUInt DeviceValue, int X, int Y, Byte &Red, Byte &Green, Byte &Blue, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->GetPixel(void * DeviceValue, int X, int Y, Byte &Red, Byte &Green, Byte &Blue, TVIkOutPutDeviceMode DeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.GetPixel(DeviceValue: THandle; X: Integer; Y: Integer; var Red: Byte; var Green: Byte; var Blue: Byte; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.GetPixel(DeviceValue: Pointer; X: Integer; Y: Integer; var Red: Byte; var Green: Byte; var Blue: Byte; DeviceMode: TVIkOutPutDeviceMode)

[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/10

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

 

The ImageKit10 VCL is a product created by Newtone Corporation