| ImgGetBlackValue | Top Previous Next | 
| Prototype 
 IntColor:=ImgGetBlackValue(intImageHandle) 
 Description 
 Returns the code corresponding to the black color for the shown image. It's useful in monochrome image for understanding if black code is '1' or '0'. 
 Parameters 
 intImageHandle: integer value corresponding to the image handle. 
 Returned value 
 IntColor: integer value showing the black 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 black color color:=ImgGetBlackValue(_CurrentImage); 
 // Printing a black 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'); 
 
 |