ImgGetPixel |
Top Previous Next |
Prototype
ColorPixel:=ImgGetPixel(intImageHandle; intX,intY)
Description
Gets the color of a specific pixel element using x and y coordinates.
Parameters
intImageHandle: integer value corresponding to the image handle.
intX: integer value corresponding to the column.
intY: integer value corresponding to the line.
Returned value
ColorPixel: numerical value showing the indicated pixel color.
Notes
None.
Example
// Store pixel color from a different area from the background. ColorPixel:=ImgGetPixel(_CurrentImage,10,10);
// Extracting width and height width:=ImgGetWidth(_CurrentImage); height:=ImgGetHeight(_CurrentImage);
// Printing a border around current image using ColorPixel for x:=0 to width-1 do begin ImgSetPixel(_CurrentImage,x,0,color); ImgSetPixel(_CurrentImage,x,height-1,color); end; for y:=0 to height-1 do begin ImgSetPixel(_CurrentImage,0,y,color); ImgSetPixel(_CurrentImage,width-1,y,color); end;
ApplicationLog('Drawing');
|