ImgGetWhiteValue |
Top Previous Next |
Prototype
IntColor:=ImgGetWhiteValue(intImageHandle)
Description
Returns the code corresponding to the white color for the shown image.
Parameters
intImageHandle: integer value corresponding to the image handle.
Returned value
IntColor: integer value showing the white color of the image.
Notes
None.
Example
// Transforming image to monochrome format if required nBits:=ImgGetBitsPixel(_CurrentImage); if nBits>1 then ImgThreshold(_CurrentImage,127);
// Extract the width and height width:=ImgGetWidth(_CurrentImage); height:=ImgGetHeight(_CurrentImage); //value for white color color:=ImgGetWhiteValue(_CurrentImage);
// Printing a white border around current image 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');
|