ImgGetWhiteValue
Previous  Top  Next

Prototype

IntColor:=ImgGetWhiteValue(intImageHandle)

Description

It returns the code corresponding to the white colour for the shown image.


Parameters

intImageHandle: integer value corresponding to the image handle.

Returned value

IntColor: integer value showing the white colour of the image.

Notes

None.

Example

// transforming image to monochrome format
nBits:=ImgGetBitsPixel(_CurrentImage);
if nBits>1 then ImgThreshold(_CurrentImage,127);

//extracting 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(_CurrentAgent,'Drawing');